Fix type hints on the PkDecryption class
This commit is contained in:
parent
81f5c4a3cd
commit
86a3d95855
3 changed files with 7 additions and 4 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -38,3 +38,6 @@ xcuserdata/
|
|||
*.dSYM
|
||||
Pods/
|
||||
*.xcworkspace
|
||||
|
||||
# JetBrains tools
|
||||
.idea/
|
||||
|
|
|
@ -217,7 +217,7 @@ class PkDecryption(object):
|
|||
random_buffer, random_length
|
||||
)
|
||||
self._check_error(ret)
|
||||
self.public_key = bytes_to_native_str(ffi.unpack(
|
||||
self.public_key: str = bytes_to_native_str(ffi.unpack(
|
||||
key_buffer,
|
||||
key_length
|
||||
))
|
||||
|
@ -267,7 +267,7 @@ class PkDecryption(object):
|
|||
|
||||
@classmethod
|
||||
def from_pickle(cls, pickle, passphrase=""):
|
||||
# types: (bytes, str) -> PkDecryption
|
||||
# type: (bytes, str) -> PkDecryption
|
||||
"""Restore a previously stored PkDecryption object.
|
||||
|
||||
Creates a PkDecryption object from a pickled base64 string. Decrypts
|
||||
|
@ -314,7 +314,7 @@ class PkDecryption(object):
|
|||
return obj
|
||||
|
||||
def decrypt(self, message, unicode_errors="replace"):
|
||||
# type (PkMessage, str) -> str
|
||||
# type: (PkMessage, str) -> str
|
||||
"""Decrypt a previously encrypted Pk message.
|
||||
|
||||
Returns the decrypted plaintext.
|
||||
|
|
0
python/olm/py.typed
Normal file
0
python/olm/py.typed
Normal file
Loading…
Reference in a new issue