How to create a hint during defining the function which would indicates untypical object which returns?

Viewed 29

i am trying to define function which would indicates that returns object type of hashlib.sha256(b'password') Explicitly what i wanna do is: def encrypt(self, password: str) -> _hashlib.HASH: Unfortunately ,,_hashlib.HASH" cannot be read properly by my interpreter, there is an error of unknown object. How to handle it?

1 Answers
Related