AsyncCollectionReference.list_documents's return type is AsyncGenerator[DocumentReference, None]. However, since this is an AsyncCollection, it should be AsyncGenerator[AsyncDocumentReference, None].
Similarly, in base_collection._item_to_document_ref the return type should be DocumentReference | AsyncDocumentReference, since it's using the collection's document method and that can return either type depending on the collection.
With the wrong types code editors and lint tools get confused :)
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.0