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

fix: update type hint for async_collection.document() to AsyncDocumen… #370

Merged
merged 5 commits into from Jun 16, 2021

Conversation

kolea2
Copy link
Contributor

@kolea2 kolea2 commented Jun 15, 2021

…tReference

Fixes #369 🦕

@kolea2 kolea2 requested a review from a team June 15, 2021 19:00
@kolea2 kolea2 requested a review from a team as a code owner June 15, 2021 19:00
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jun 15, 2021
@product-auto-label product-auto-label bot added the api: firestore Issues related to the googleapis/python-firestore API. label Jun 15, 2021
Copy link
Contributor

@craiglabenz craiglabenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

:class:`~google.cloud.firestore_v1.document.async_document.AsyncDocumentReference`:
The child document.
"""
return super(AsyncCollectionReference, self).document(document_id)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, it's unfortunate that we still use the Python 2 syntax here, though I see that's the pattern across the library and you were just following it. Nothing to do here except collectively shrug our shoulders.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are welcome to go through and refactor this. This is less a choice and more a fact that this library evolved from Py2/3 compliant code and we didn't refactor more than necessary to use new features really (AsyncIO, f strings, etc)

@kolea2 kolea2 added the automerge Merge the pull request once unit tests and other checks pass. label Jun 16, 2021
@gcf-merge-on-green gcf-merge-on-green bot merged commit ee6a1c2 into googleapis:master Jun 16, 2021
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Jun 16, 2021
@kolea2 kolea2 deleted the async-hint branch June 16, 2021 18:15
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. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change Type Hit at AsyncCollectionReference.document
4 participants