Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions google/cloud/firestore_v1/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
from google.cloud.firestore_v1.services.firestore.transports import (
grpc as firestore_grpc_transport,
)
from typing import Any, Generator, Iterable, Tuple
from typing import Any, Generator, Iterable, Tuple, Union

# Types needed only for Type Hints
from google.cloud.firestore_v1.base_document import DocumentSnapshot
Expand Down Expand Up @@ -117,7 +117,7 @@ def _target(self):
"""
return self._target_helper(firestore_client.FirestoreClient)

def collection(self, *collection_path: Tuple[str]) -> CollectionReference:
def collection(self, *collection_path: Union[Tuple[str], str]) -> CollectionReference:
"""Get a reference to a collection.

For a top-level collection:
Expand All @@ -137,7 +137,7 @@ def collection(self, *collection_path: Tuple[str]) -> CollectionReference:
Sub-collections can be nested deeper in a similar fashion.

Args:
collection_path (Tuple[str, ...]): Can either be
collection_path (Union[Tuple[str, ...], str]): Can either be

* A single ``/``-delimited path to a collection
* A tuple of collection path segments
Expand Down Expand Up @@ -170,7 +170,7 @@ def collection_group(self, collection_id: str) -> CollectionGroup:
"""
return CollectionGroup(self._get_collection_reference(collection_id))

def document(self, *document_path: Tuple[str]) -> DocumentReference:
def document(self, *document_path: Union[Tuple[str], str]) -> DocumentReference:
"""Get a reference to a document in a collection.

For a top-level document:
Expand All @@ -192,7 +192,7 @@ def document(self, *document_path: Tuple[str]) -> DocumentReference:
Documents in sub-collections can be nested deeper in a similar fashion.

Args:
document_path (Tuple[str, ...]): Can either be
document_path (Union[Tuple[str, ...], str]): Can either be

* A single ``/``-delimited path to a document
* A tuple of document path segments
Expand Down