Bibo-Joshi · GitHub

@marinelay

Copy link Copy Markdown

Contributor

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

marinelay

Bibo-Joshi

Copy link Copy Markdown

Member

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 Copy Markdown

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.

Bibo-Joshi

Copy link Copy Markdown

Member

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

Read the original on github.com ↗