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

chore: fix mypy check #984

Merged
merged 39 commits into from
Dec 9, 2024
Merged

chore: fix mypy check #984

merged 39 commits into from
Dec 9, 2024

Conversation

daniel-sanche
Copy link
Contributor

The nox -s mypy check is currently targeting an empty folder, so it is giving a false positive. Because of this, the type annotations for python-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 (see bulk_writer.py). The rest of the logic can be cleaned up over time, now that we have working type checks in place

@daniel-sanche daniel-sanche requested review from a team as code owners November 19, 2024 00:15
@product-auto-label product-auto-label bot added the size: l Pull request size is large. label Nov 19, 2024
@product-auto-label product-auto-label bot added the api: firestore Issues related to the googleapis/python-firestore API. label Nov 19, 2024
@daniel-sanche daniel-sanche enabled auto-merge (squash) November 26, 2024 23:28
@daniel-sanche daniel-sanche added the owlbot:run Add this label to trigger the Owlbot post processor. label Dec 9, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Dec 9, 2024
@daniel-sanche daniel-sanche merged commit a1596a3 into main Dec 9, 2024
22 checks passed
@daniel-sanche daniel-sanche deleted the fix_types branch December 9, 2024 19:20
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants