Strict python typing throws error on get()
method for being partially unknown
#974
Labels
api: firestore
Issues related to the googleapis/python-firestore API.
python-firestore/google/cloud/firestore_v1/async_document.py
Line 328 in 3fe7271
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 whichtransaction
is set to None without explicitly declaring its type. This seems like an easy fix, even if that is as simple astransaction: 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 anAsyncDocumentRerference
, orAysncCollectionReference
, 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.
The text was updated successfully, but these errors were encountered: