diff --git a/.librarian/generator-input/client-post-processing/containeranalysis-grafeas-integration.yaml b/.librarian/generator-input/client-post-processing/containeranalysis-grafeas-integration.yaml index 48b10313e71c..8b88081a2f26 100644 --- a/.librarian/generator-input/client-post-processing/containeranalysis-grafeas-integration.yaml +++ b/.librarian/generator-input/client-post-processing/containeranalysis-grafeas-integration.yaml @@ -49,9 +49,9 @@ replacements: packages/google-cloud-containeranalysis/google/cloud/devtools/containeranalysis_v1/services/container_analysis/async_client.py, ] before: | - from google.iam.v1 import policy_pb2 # type: ignore\n + import google.iam.v1.policy_pb2 as policy_pb2 # type: ignore\n after: | - from google.iam.v1 import policy_pb2 # type: ignore + import google.iam.v1.policy_pb2 as policy_pb2 # type: ignore from grafeas import grafeas_v1 from grafeas.grafeas_v1.services.grafeas import transports\n count: 2 @@ -110,7 +110,7 @@ replacements: - paths: [ packages/google-cloud-containeranalysis/google/cloud/devtools/containeranalysis_v1/types/containeranalysis.py ] - before: from grafeas.v1 import severity_pb2 # type: ignore + before: import grafeas.v1.severity_pb2 as severity_pb2 # type: ignore after: import grafeas.grafeas_v1 # type: ignore count: 1 - paths: [ diff --git a/.librarian/generator-input/client-post-processing/proto-plus-dependency-with-modified-namespace.yaml b/.librarian/generator-input/client-post-processing/proto-plus-dependency-with-modified-namespace.yaml index 78797d2b1b4e..11d99c4572cb 100644 --- a/.librarian/generator-input/client-post-processing/proto-plus-dependency-with-modified-namespace.yaml +++ b/.librarian/generator-input/client-post-processing/proto-plus-dependency-with-modified-namespace.yaml @@ -18,7 +18,7 @@ replacements: packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/types/service.py, ] before: | - from grafeas.v1 import attestation_pb2 # type: ignore + import grafeas.v1.attestation_pb2 as attestation_pb2 # type: ignore after: | import grafeas.grafeas_v1.types # type: ignore count: 1 @@ -37,7 +37,7 @@ replacements: - paths: [ packages/google-cloud-policytroubleshooter-iam/google/cloud/policytroubleshooter_iam_v3/types/troubleshooter.py, ] - before: from google.iam.v2 import policy_pb2 # type: ignore + before: import google.iam.v2.policy_pb2 as policy_pb2 # type: ignore after: from google.cloud.iam_v2 import Policy # type: ignore count: 1 - paths: [ diff --git a/.librarian/generator-input/client-post-processing/remove-unused-imports.yaml b/.librarian/generator-input/client-post-processing/remove-unused-imports.yaml index c120e46ae4bc..b34603c55008 100644 --- a/.librarian/generator-input/client-post-processing/remove-unused-imports.yaml +++ b/.librarian/generator-input/client-post-processing/remove-unused-imports.yaml @@ -18,17 +18,15 @@ replacements: packages/google-cloud-gke-hub/tests/unit/gapic/gkehub_v1/test_gke_hub.py ] before: | - from google.cloud.gkehub.configmanagement.v1 import configmanagement_pb2 # type: ignore - from google.cloud.gkehub.multiclusteringress.v1 import \( - multiclusteringress_pb2, - \) # type: ignore + import google.cloud.gkehub.configmanagement.v1.configmanagement_pb2 as configmanagement_pb2 # type: ignore + import google.cloud.gkehub.multiclusteringress.v1.multiclusteringress_pb2 as multiclusteringress_pb2 # type: ignore after: "" count: 1 - paths: [ packages/google-cloud-binary-authorization/tests/unit/gapic/binaryauthorization_v1/test_validation_helper_v1.py ] before: | - from grafeas.v1 import attestation_pb2 # type: ignore - from grafeas.v1 import common_pb2 # type: ignore + import grafeas.v1.attestation_pb2 as attestation_pb2 # type: ignore + import grafeas.v1.common_pb2 as common_pb2 # type: ignore after: "" count: 1 diff --git a/.librarian/generator-input/client-post-processing/sub-api-versioned-namespace.yaml b/.librarian/generator-input/client-post-processing/sub-api-versioned-namespace.yaml index 8abb48f3e752..202c0ffa5f3b 100644 --- a/.librarian/generator-input/client-post-processing/sub-api-versioned-namespace.yaml +++ b/.librarian/generator-input/client-post-processing/sub-api-versioned-namespace.yaml @@ -18,10 +18,8 @@ replacements: packages/google-cloud-gke-hub/google/cloud/gkehub_v1/types/feature.py ] before: | - from google.cloud.gkehub.configmanagement.v1 import configmanagement_pb2 # type: ignore - from google.cloud.gkehub.multiclusteringress.v1 import \( - multiclusteringress_pb2, - \) # type: ignore + import google.cloud.gkehub.configmanagement.v1.configmanagement_pb2 as configmanagement_pb2 # type: ignore + import google.cloud.gkehub.multiclusteringress.v1.multiclusteringress_pb2 as multiclusteringress_pb2 # type: ignore after: | from google.cloud.gkehub_v1 import configmanagement_v1 # type: ignore from google.cloud.gkehub_v1 import multiclusteringress_v1 # type: ignore diff --git a/.librarian/generator-input/client-post-processing/unique-grafeas-client.yaml b/.librarian/generator-input/client-post-processing/unique-grafeas-client.yaml index 065363d674ad..cc094c35201e 100644 --- a/.librarian/generator-input/client-post-processing/unique-grafeas-client.yaml +++ b/.librarian/generator-input/client-post-processing/unique-grafeas-client.yaml @@ -61,7 +61,8 @@ replacements: \ Returns: \ GrafeasAsyncClient: The constructed client. \ """ - \ return GrafeasClient.from_service_account_file.__func__\(GrafeasAsyncClient, filename, \*args, \*\*kwargs\) # type: ignore + \ sa_file_func = GrafeasClient.from_service_account_file.__func__ # type: ignore + \ return sa_file_func\(GrafeasAsyncClient, filename, \*args, \*\*kwargs\) \ \ from_service_account_json = from_service_account_file \