Skip to content

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