-
Notifications
You must be signed in to change notification settings - Fork 84
Closed
Labels
api: firestoreIssues related to the googleapis/python-firestore API.Issues related to the googleapis/python-firestore API.priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
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 :)
Environment details
google-cloud-firestoreversion: 2.15.0
Metadata
Metadata
Assignees
Labels
api: firestoreIssues related to the googleapis/python-firestore API.Issues related to the googleapis/python-firestore API.priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.