Skip to content

Commit

Permalink
Fix Annotation of EncryptedCredentials.decrypted_secret (#4199)
Browse files Browse the repository at this point in the history
Co-authored-by: marinelay <marinelay@gmail.com>
  • Loading branch information
marinelay and marinelay committed Apr 13, 2024
1 parent f6d009d commit 58b8ef4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ The following wonderful people contributed directly or indirectly to this projec
- `Vorobjev Simon <https://github.com/simonvorobjev>`_
- `Wagner Macedo <https://github.com/wagnerluis1982>`_
- `wjt <https://github.com/wjt>`_
- `Wonseok Oh <https://github.com/marinelay>`_
- `Yaw Danso <https://github.com/dglitxh>`_
- `Yao Kuan <https://github.com/thatguylah>`_
- `zeroone2numeral2 <https://github.com/zeroone2numeral2>`_
Expand Down
6 changes: 3 additions & 3 deletions telegram/_passport/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,15 @@ def __init__(

self._id_attrs = (self.data, self.hash, self.secret)

self._decrypted_secret: Optional[str] = None
self._decrypted_secret: Optional[bytes] = None
self._decrypted_data: Optional[Credentials] = None

self._freeze()

@property
def decrypted_secret(self) -> str:
def decrypted_secret(self) -> bytes:
"""
:obj:`str`: Lazily decrypt and return secret.
:obj:`bytes`: Lazily decrypt and return secret.
Raises:
telegram.error.PassportDecryptionError: Decryption failed. Usually due to bad
Expand Down

0 comments on commit 58b8ef4

Please sign in to comment.