Fix Annotation of EncryptedCredentials.decrypted_secret (#4199)

Co-authored-by: marinelay <marinelay@gmail.com>
This commit is contained in:
marinelay 2024-04-14 03:27:29 +09:00 committed by GitHub
parent f6d009d3ac
commit 58b8ef4ce4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View file

@ -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>`_

View file

@ -153,15 +153,15 @@ class EncryptedCredentials(TelegramObject):
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