Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix annotation of decrypted_secret #4199

Merged
merged 1 commit into from Apr 13, 2024

Conversation

marinelay
Copy link
Contributor

Close #4198
Fix type annotation of self._decrypted_secret from str to bytes

Copy link
Member

@Bibo-Joshi Bibo-Joshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Just one question: Is the "# type: ignore" iin line 183 still necessary with your changes or can it be removed?

@marinelay
Copy link
Contributor Author

I think it is still necessary despite the change.
The type checker infers self.get_bot().private_key can be None, so it reports false alarm with the message "None does not have attribute 'private_key".
I used Pyright for this, but I believe that mypy is the same.

Copy link
Member

@Bibo-Joshi Bibo-Joshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, right … Then let's merge. Thanks for the contribution!

@Bibo-Joshi Bibo-Joshi merged commit 58b8ef4 into python-telegram-bot:master Apr 13, 2024
23 of 24 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Apr 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Type Hinting] EncryptedCredentials.decrypted_secret is not properly annotated
2 participants