diff --git a/google/cloud/artifactregistry_v1beta2/services/artifact_registry/client.py b/google/cloud/artifactregistry_v1beta2/services/artifact_registry/client.py index 609ef70..dec72cd 100644 --- a/google/cloud/artifactregistry_v1beta2/services/artifact_registry/client.py +++ b/google/cloud/artifactregistry_v1beta2/services/artifact_registry/client.py @@ -187,17 +187,17 @@ def transport(self) -> ArtifactRegistryTransport: return self._transport @staticmethod - def file_path(project: str, location: str, repo: str, file: str,) -> str: + def file_path(project: str, location: str, repository: str, file: str,) -> str: """Returns a fully-qualified file string.""" - return "projects/{project}/locations/{location}/repositories/{repo}/files/{file}".format( - project=project, location=location, repo=repo, file=file, + return "projects/{project}/locations/{location}/repositories/{repository}/files/{file}".format( + project=project, location=location, repository=repository, file=file, ) @staticmethod def parse_file_path(path: str) -> Dict[str, str]: """Parses a file path into its component segments.""" m = re.match( - r"^projects/(?P.+?)/locations/(?P.+?)/repositories/(?P.+?)/files/(?P.+?)$", + r"^projects/(?P.+?)/locations/(?P.+?)/repositories/(?P.+?)/files/(?P.+?)$", path, ) return m.groupdict() if m else {} diff --git a/tests/unit/gapic/artifactregistry_v1beta2/test_artifact_registry.py b/tests/unit/gapic/artifactregistry_v1beta2/test_artifact_registry.py index 65be90d..6bdf00f 100644 --- a/tests/unit/gapic/artifactregistry_v1beta2/test_artifact_registry.py +++ b/tests/unit/gapic/artifactregistry_v1beta2/test_artifact_registry.py @@ -5913,12 +5913,12 @@ def test_artifact_registry_grpc_lro_async_client(): def test_file_path(): project = "squid" location = "clam" - repo = "whelk" + repository = "whelk" file = "octopus" - expected = "projects/{project}/locations/{location}/repositories/{repo}/files/{file}".format( - project=project, location=location, repo=repo, file=file, + expected = "projects/{project}/locations/{location}/repositories/{repository}/files/{file}".format( + project=project, location=location, repository=repository, file=file, ) - actual = ArtifactRegistryClient.file_path(project, location, repo, file) + actual = ArtifactRegistryClient.file_path(project, location, repository, file) assert expected == actual @@ -5926,7 +5926,7 @@ def test_parse_file_path(): expected = { "project": "oyster", "location": "nudibranch", - "repo": "cuttlefish", + "repository": "cuttlefish", "file": "mussel", } path = ArtifactRegistryClient.file_path(**expected)