diff --git a/google/cloud/firestore_v1/async_client.py b/google/cloud/firestore_v1/async_client.py index 512025f24..637aafde9 100644 --- a/google/cloud/firestore_v1/async_client.py +++ b/google/cloud/firestore_v1/async_client.py @@ -49,7 +49,7 @@ from google.cloud.firestore_v1.services.firestore.transports import ( grpc_asyncio as firestore_grpc_transport, ) -from typing import Any, AsyncGenerator, Iterable, Tuple +from typing import Any, AsyncGenerator, Iterable class AsyncClient(BaseClient): @@ -119,7 +119,7 @@ def _target(self): """ return self._target_helper(firestore_client.FirestoreAsyncClient) - def collection(self, *collection_path: Tuple[str]) -> AsyncCollectionReference: + def collection(self, *collection_path: str) -> AsyncCollectionReference: """Get a reference to a collection. For a top-level collection: @@ -139,7 +139,7 @@ def collection(self, *collection_path: Tuple[str]) -> AsyncCollectionReference: Sub-collections can be nested deeper in a similar fashion. Args: - collection_path (Tuple[str, ...]): Can either be + collection_path: Can either be * A single ``/``-delimited path to a collection * A tuple of collection path segments @@ -172,7 +172,7 @@ def collection_group(self, collection_id: str) -> AsyncCollectionGroup: """ return AsyncCollectionGroup(self._get_collection_reference(collection_id)) - def document(self, *document_path: Tuple[str]) -> AsyncDocumentReference: + def document(self, *document_path: str) -> AsyncDocumentReference: """Get a reference to a document in a collection. For a top-level document: @@ -194,7 +194,7 @@ def document(self, *document_path: Tuple[str]) -> AsyncDocumentReference: Documents in sub-collections can be nested deeper in a similar fashion. Args: - document_path (Tuple[str, ...]): Can either be + document_path: Can either be * A single ``/``-delimited path to a document * A tuple of document path segments diff --git a/google/cloud/firestore_v1/base_client.py b/google/cloud/firestore_v1/base_client.py index 98ee1aa28..0f3c8e706 100644 --- a/google/cloud/firestore_v1/base_client.py +++ b/google/cloud/firestore_v1/base_client.py @@ -314,7 +314,7 @@ def _document_path_helper(self, *document_path) -> List[str]: return joined_path.split(_helpers.DOCUMENT_PATH_DELIMITER) @staticmethod - def field_path(*field_names: Tuple[str]) -> str: + def field_path(*field_names: str) -> str: """Create a **field path** from a list of nested field names. A **field path** is a ``.``-delimited concatenation of the field @@ -335,7 +335,7 @@ def field_path(*field_names: Tuple[str]) -> str: ``data['aa']['bb']['cc']``. Args: - field_names (Tuple[str, ...]): The list of field names. + field_names: The list of field names. Returns: str: The ``.``-delimited field path. diff --git a/google/cloud/firestore_v1/client.py b/google/cloud/firestore_v1/client.py index 6ad5f76e6..20ef5055f 100644 --- a/google/cloud/firestore_v1/client.py +++ b/google/cloud/firestore_v1/client.py @@ -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 # Types needed only for Type Hints from google.cloud.firestore_v1.base_document import DocumentSnapshot @@ -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: str) -> CollectionReference: """Get a reference to a collection. For a top-level collection: @@ -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: Can either be * A single ``/``-delimited path to a collection * A tuple of collection path segments @@ -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: str) -> DocumentReference: """Get a reference to a document in a collection. For a top-level document: @@ -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): Can either be * A single ``/``-delimited path to a document * A tuple of document path segments