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

Strict python typing throws error on get() method for being partially unknown #974

Open
Stak-Michael-Grant opened this issue Oct 6, 2024 · 0 comments
Assignees
Labels
api: firestore Issues related to the googleapis/python-firestore API.

Comments

@Stak-Michael-Grant
Copy link

Using strict type check linting in my IDE throws errors when calling the get method on an AsyncDocumentReference type. This comes from the above code, in which transaction is set to None without explicitly declaring its type. This seems like an easy fix, even if that is as simple as transaction: Any | None = None, although probably not recommended. This is not the only place using the google cloud python sdk. In fact anytime I'm calling a method on an AsyncDocumentRerference, or AysncCollectionReference, I find myself needing a # type: ignore following it just to get rid of my linter yelling at me.

It would be nice to have more explicit complete typing on these methods, so I'm bringing it up in an issue and see where it goes. Below is a screenshot of the error that I get for this specific instance, but can be extrapolated to any method/function that is not being strict in their param type definitions.

Screenshot 2024-10-06 at 12 17 07 PM

@product-auto-label product-auto-label bot added the api: firestore Issues related to the googleapis/python-firestore API. label Oct 6, 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.
Projects
None yet
Development

No branches or pull requests

2 participants