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

Wrong return type in AsyncCollectionReference.list_documents #918

Open
gblazq opened this issue Apr 24, 2024 · 0 comments
Open

Wrong return type in AsyncCollectionReference.list_documents #918

gblazq opened this issue Apr 24, 2024 · 0 comments
Assignees
Labels
api: firestore Issues related to the googleapis/python-firestore API.

Comments

@gblazq
Copy link

gblazq commented Apr 24, 2024

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-firestore version: 2.15.0
@product-auto-label product-auto-label bot added the api: firestore Issues related to the googleapis/python-firestore API. label Apr 24, 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