-
Notifications
You must be signed in to change notification settings - Fork 75
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: fix mypy check #984
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
product-auto-label
bot
added
the
api: firestore
Issues related to the googleapis/python-firestore API.
label
Nov 19, 2024
cindy-peng
approved these changes
Nov 26, 2024
This was referenced Nov 26, 2024
Closed
daniel-sanche
force-pushed
the
fix_types
branch
from
November 26, 2024 23:14
cf2e4aa
to
205576d
Compare
daniel-sanche
added
the
owlbot:run
Add this label to trigger the Owlbot post processor.
label
Dec 9, 2024
gcf-owl-bot
bot
removed
the
owlbot:run
Add this label to trigger the Owlbot post processor.
label
Dec 9, 2024
This was referenced Dec 19, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
api: firestore
Issues related to the googleapis/python-firestore API.
size: l
Pull request size is large.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
nox -s mypy
check is currently targeting an empty folder, so it is giving a false positive. Because of this, the type annotations forpython-firestore
have been broken, which has been at the root of a large number of open issues (see #773 and associated issues)This PR fixes the problem by fixing the mypy check, and making enough changes so that the test passes again
Since this fix requires many changes throughout the codebase, I tried to make the changes as minimal as possible. None of the actual logic should be changed here, just the types. When I couldn't completely resolve typing issues without refactoring code, I used targeted
type: ignore
anntotations instead (seebulk_writer.py
). The rest of the logic can be cleaned up over time, now that we have working type checks in place