Skip to content
This repository was archived by the owner on Mar 2, 2026. It is now read-only.

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

Merged
gcf-merge-on-green[bot] merged 5 commits into
googleapis:masterfrom
kolea2:async-hint
Jun 16, 2021
Merged

fix: update type hint for async_collection.document() to AsyncDocumen…#370
gcf-merge-on-green[bot] merged 5 commits into
googleapis:masterfrom
kolea2:async-hint

Conversation

@kolea2

@kolea2 kolea2 commented Jun 15, 2021

Copy link
Copy Markdown
Contributor

…tReference

Fixes #369 🦕

@kolea2 kolea2 requested review from a team 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

@craiglabenz craiglabenz left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

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