-
Notifications
You must be signed in to change notification settings - Fork 55
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
chore: Added mypy to noxfile #932
base: main
Are you sure you want to change the base?
Conversation
owlbot.py
Outdated
|
||
place_before( | ||
"noxfile.py", | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see firestore adds an escape character here. Maybe that's why it's not working?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found out that using s.replace
instead of place_before
makes it work. The escape characters were used because s.replace
takes in a regex.
"""Verify type hints are mypy compatible.""" | ||
session.install("-e", ".") | ||
session.install("mypy", "types-setuptools") | ||
# TODO: also verify types on tests and logging_v2, big undertakings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are those big undertakings? logging_v2 should already have valid types in place. And I'd say tests are optional
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess big is an overexaggeration, but when I ran mypy
there were 22 errors in 12 files.
you should also add a github action to execute mypy as a presubmit check |
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> 🦕