diff --git a/.coveragerc b/.coveragerc index 0d8e6297d..1ba5bb57d 100644 --- a/.coveragerc +++ b/.coveragerc @@ -30,6 +30,8 @@ exclude_lines = def __repr__ # Ignore abstract methods raise NotImplementedError + # Ignore setuptools-less fallback + except pkg_resources.DistributionNotFound: omit = */gapic/*.py */proto/*.py diff --git a/google/cloud/firestore_v1/base_client.py b/google/cloud/firestore_v1/base_client.py index 22afb09de..f532ec1b7 100644 --- a/google/cloud/firestore_v1/base_client.py +++ b/google/cloud/firestore_v1/base_client.py @@ -536,17 +536,6 @@ def _get_doc_mask(field_paths: Iterable[str]) -> Optional[types.common.DocumentM return types.DocumentMask(field_paths=field_paths) -def _item_to_collection_ref(iterator, item: str) -> BaseCollectionReference: - """Convert collection ID to collection ref. - - Args: - iterator (google.api_core.page_iterator.GRPCIterator): - iterator response - item (str): ID of the collection - """ - return iterator.client.collection(item) - - def _path_helper(path: tuple) -> Tuple[str]: """Standardize path into a tuple of path segments. diff --git a/synth.py b/synth.py index 07ce56148..8a363c592 100644 --- a/synth.py +++ b/synth.py @@ -191,6 +191,20 @@ def lint_setup_py(session): """, ) +s.replace( + ".coveragerc", + """\ + raise NotImplementedError +omit = +""", + """\ + raise NotImplementedError + # Ignore setuptools-less fallback + except pkg_resources.DistributionNotFound: +omit = +""", +) + s.shell.run(["nox", "-s", "blacken"], hide_output=False) s.replace(