Wrong return type in AsyncCollectionReference.list_documents #918
Labels
api: firestore
Issues related to the googleapis/python-firestore API.
priority: p3
Desirable enhancement or fix. May not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
AsyncCollectionReference.list_documents
's return type isAsyncGenerator[DocumentReference, None]
. However, since this is an AsyncCollection, it should beAsyncGenerator[AsyncDocumentReference, None]
.Similarly, in
base_collection._item_to_document_ref
the return type should beDocumentReference | AsyncDocumentReference
, since it's using the collection'sdocument
method and that can return either type depending on the collection.With the wrong types code editors and lint tools get confused :)
Environment details
google-cloud-firestore
version: 2.15.0The text was updated successfully, but these errors were encountered: