Skip to content

Commit

Permalink
fix: Fix typehint on AsyncDocumentReference.get() (#649)
Browse files Browse the repository at this point in the history
* fix: AsyncDocumentReference.get() only returns 1 level of coroutine.

* Remove no-longer-used imports.

Co-authored-by: Mariatta Wijaya <Mariatta@users.noreply.github.com>
  • Loading branch information
jyasskin and Mariatta authored Nov 10, 2022
1 parent e0dc40f commit a8d79c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions google/cloud/firestore_v1/async_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from google.cloud.firestore_v1 import _helpers
from google.cloud.firestore_v1.types import write
from google.protobuf.timestamp_pb2 import Timestamp
from typing import Any, AsyncGenerator, Coroutine, Iterable, Union
from typing import AsyncGenerator, Iterable


logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -329,7 +329,7 @@ async def get(
transaction=None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
) -> Union[DocumentSnapshot, Coroutine[Any, Any, DocumentSnapshot]]:
) -> DocumentSnapshot:
"""Retrieve a snapshot of the current document.
See :meth:`~google.cloud.firestore_v1.base_client.BaseClient.field_path` for
Expand Down

0 comments on commit a8d79c8

Please sign in to comment.