Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
description: Remove unused imports
url: https://github.com/googleapis/gapic-generator-python/issues/1833
replacements:
- paths: [
packages/google-cloud-gke-hub/tests/unit/gapic/gkehub_v1/test_gke_hub.py
]
before: |
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
import google.cloud.gkehub.rbacrolebindingactuation.v1.rbacrolebindingactuation_pb2 as rbacrolebindingactuation_pb2 # type: ignore
after: ""
count: 1
- paths: [
packages/google-cloud-binary-authorization/tests/unit/gapic/binaryauthorization_v1/test_validation_helper_v1.py
]
before: |
import grafeas.v1.attestation_pb2 as attestation_pb2 # type: ignore
import grafeas.v1.common_pb2 as common_pb2 # type: ignore
after: ""
count: 1
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ from google.longrunning import operations_pb2 # type: ignore
{% endif %}
from google.api_core import gapic_v1
{% for method in service.methods.values() %}
{% for ref_type in method.flat_ref_types
{% for ref_type in method.ref_types
if not ((ref_type.ident.python_import.package == ('google', 'api_core') and ref_type.ident.python_import.module == 'operation')
or ref_type.ident.python_import.package == ('google', 'protobuf') and ref_type.ident.python_import.module == 'empty_pb2') %}
{{ ref_type.ident.python_import }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ from google.longrunning import operations_pb2 # type: ignore
{% endif %}
from google.api_core import gapic_v1
{% for method in service.methods.values() %}
{% for ref_type in method.flat_ref_types
{% for ref_type in method.ref_types
if not (ref_type.ident.python_import.package == ('google', 'api_core') and ref_type.ident.python_import.module == 'operation') %}
{{ ref_type.ident.python_import }}
{% endfor %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
from google.oauth2 import service_account
import google.api_core.operation_async as operation_async # type: ignore
import google.auth
import google.protobuf.duration_pb2 as duration_pb2 # type: ignore
import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore
import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
import google.rpc.status_pb2 as status_pb2 # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
from google.cloud.eventarc_v1.types import logging_config
from google.cloud.eventarc_v1.types import message_bus
from google.cloud.eventarc_v1.types import message_bus as gce_message_bus
from google.cloud.eventarc_v1.types import network_config
from google.cloud.eventarc_v1.types import pipeline
from google.cloud.eventarc_v1.types import pipeline as gce_pipeline
from google.cloud.eventarc_v1.types import trigger
Expand All @@ -83,8 +84,10 @@
from google.oauth2 import service_account
import google.api_core.operation_async as operation_async # type: ignore
import google.auth
import google.protobuf.duration_pb2 as duration_pb2 # type: ignore
import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore
import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
import google.rpc.code_pb2 as code_pb2 # type: ignore



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@
from google.oauth2 import service_account
import google.api.monitored_resource_pb2 as monitored_resource_pb2 # type: ignore
import google.auth
import google.logging.type.http_request_pb2 as http_request_pb2 # type: ignore
import google.logging.type.log_severity_pb2 as log_severity_pb2 # type: ignore
import google.protobuf.any_pb2 as any_pb2 # type: ignore
import google.protobuf.duration_pb2 as duration_pb2 # type: ignore
import google.protobuf.struct_pb2 as struct_pb2 # type: ignore
import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,11 @@
from google.longrunning import operations_pb2 # type: ignore
from google.oauth2 import service_account
import google.api.distribution_pb2 as distribution_pb2 # type: ignore
import google.api.label_pb2 as label_pb2 # type: ignore
import google.api.launch_stage_pb2 as launch_stage_pb2 # type: ignore
import google.api.metric_pb2 as metric_pb2 # type: ignore
import google.auth
import google.protobuf.duration_pb2 as duration_pb2 # type: ignore
import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@
from google.oauth2 import service_account
import google.api.monitored_resource_pb2 as monitored_resource_pb2 # type: ignore
import google.auth
import google.logging.type.http_request_pb2 as http_request_pb2 # type: ignore
import google.logging.type.log_severity_pb2 as log_severity_pb2 # type: ignore
import google.protobuf.any_pb2 as any_pb2 # type: ignore
import google.protobuf.duration_pb2 as duration_pb2 # type: ignore
import google.protobuf.struct_pb2 as struct_pb2 # type: ignore
import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,11 @@
from google.longrunning import operations_pb2 # type: ignore
from google.oauth2 import service_account
import google.api.distribution_pb2 as distribution_pb2 # type: ignore
import google.api.label_pb2 as label_pb2 # type: ignore
import google.api.launch_stage_pb2 as launch_stage_pb2 # type: ignore
import google.api.metric_pb2 as metric_pb2 # type: ignore
import google.auth
import google.protobuf.duration_pb2 as duration_pb2 # type: ignore
import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,12 @@
from google.oauth2 import service_account
import google.api_core.operation_async as operation_async # type: ignore
import google.auth
import google.protobuf.duration_pb2 as duration_pb2 # type: ignore
import google.protobuf.empty_pb2 as empty_pb2 # type: ignore
import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore
import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
import google.type.dayofweek_pb2 as dayofweek_pb2 # type: ignore
import google.type.timeofday_pb2 as timeofday_pb2 # type: ignore



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,12 @@
from google.oauth2 import service_account
import google.api_core.operation_async as operation_async # type: ignore
import google.auth
import google.protobuf.duration_pb2 as duration_pb2 # type: ignore
import google.protobuf.empty_pb2 as empty_pb2 # type: ignore
import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore
import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
import google.type.dayofweek_pb2 as dayofweek_pb2 # type: ignore
import google.type.timeofday_pb2 as timeofday_pb2 # type: ignore



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
import google.api_core.operation_async as operation_async # type: ignore
import google.auth
import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
import google.rpc.code_pb2 as code_pb2 # type: ignore



Expand Down
Loading