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

Improve usability of type annotations with mypy. #133

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Flameeyes
Copy link

This pull request includes a couple of fixes were mypy appears to be stricter than pytype, and adds PEP 561 markings so that mypy knows that the module contains type information.

This would allow absl-py users to type-check their code with e.g. mypy.
Because `wasSuccessful()` is not defined within the class, but is
"monkey-patched" in, the implicit `self` argument is not correctly typed.

Make it explicit for it to be handled correctly.
mypy is strict in wanting the comment before the docs, and will report
"invalid syntax" otherwise.
mypy is stricter when it comes to propagation of None values.
@Flameeyes
Copy link
Author

@yilei @gpshead ping? :)

@Flameeyes
Copy link
Author

Folks will I ever get this one merged in? :)

@jinnatar
Copy link

Friendly ping, can this still be rescued?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants