Skip to content

Commit 2dd5d77

Browse files
committed
revert
1 parent a315e31 commit 2dd5d77

11 files changed

Lines changed: 2 additions & 31 deletions

File tree

packages/gapic-generator/gapic/ads-templates/tests/unit/gapic/%name_%version/%sub/test_%service.py.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ from google.longrunning import operations_pb2 # type: ignore
5757
{% endif %}
5858
from google.api_core import gapic_v1
5959
{% for method in service.methods.values() %}
60-
{% for ref_type in method.ref_types
60+
{% for ref_type in method.flat_ref_types
6161
if not ((ref_type.ident.python_import.package == ('google', 'api_core') and ref_type.ident.python_import.module == 'operation')
6262
or ref_type.ident.python_import.package == ('google', 'protobuf') and ref_type.ident.python_import.module == 'empty_pb2') %}
6363
{{ ref_type.ident.python_import }}

packages/gapic-generator/gapic/templates/tests/unit/gapic/%name_%version/%sub/test_%service.py.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ from google.longrunning import operations_pb2 # type: ignore
8686
{% endif %}
8787
from google.api_core import gapic_v1
8888
{% for method in service.methods.values() %}
89-
{% for ref_type in method.ref_types
89+
{% for ref_type in method.flat_ref_types
9090
if not (ref_type.ident.python_import.package == ('google', 'api_core') and ref_type.ident.python_import.module == 'operation') %}
9191
{{ ref_type.ident.python_import }}
9292
{% endfor %}

packages/gapic-generator/tests/integration/goldens/asset/tests/unit/gapic/asset_v1/test_asset_service.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
from google.oauth2 import service_account
6363
import google.api_core.operation_async as operation_async # type: ignore
6464
import google.auth
65-
import google.protobuf.duration_pb2 as duration_pb2 # type: ignore
6665
import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore
6766
import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
6867
import google.rpc.status_pb2 as status_pb2 # type: ignore

packages/gapic-generator/tests/integration/goldens/eventarc/tests/unit/gapic/eventarc_v1/test_eventarc.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@
7171
from google.cloud.eventarc_v1.types import logging_config
7272
from google.cloud.eventarc_v1.types import message_bus
7373
from google.cloud.eventarc_v1.types import message_bus as gce_message_bus
74-
from google.cloud.eventarc_v1.types import network_config
7574
from google.cloud.eventarc_v1.types import pipeline
7675
from google.cloud.eventarc_v1.types import pipeline as gce_pipeline
7776
from google.cloud.eventarc_v1.types import trigger
@@ -84,10 +83,8 @@
8483
from google.oauth2 import service_account
8584
import google.api_core.operation_async as operation_async # type: ignore
8685
import google.auth
87-
import google.protobuf.duration_pb2 as duration_pb2 # type: ignore
8886
import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore
8987
import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
90-
import google.rpc.code_pb2 as code_pb2 # type: ignore
9188

9289

9390

packages/gapic-generator/tests/integration/goldens/logging/tests/unit/gapic/logging_v2/test_logging_service_v2.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,6 @@
5353
from google.oauth2 import service_account
5454
import google.api.monitored_resource_pb2 as monitored_resource_pb2 # type: ignore
5555
import google.auth
56-
import google.logging.type.http_request_pb2 as http_request_pb2 # type: ignore
57-
import google.logging.type.log_severity_pb2 as log_severity_pb2 # type: ignore
58-
import google.protobuf.any_pb2 as any_pb2 # type: ignore
59-
import google.protobuf.duration_pb2 as duration_pb2 # type: ignore
60-
import google.protobuf.struct_pb2 as struct_pb2 # type: ignore
61-
import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
6256

6357

6458

packages/gapic-generator/tests/integration/goldens/logging/tests/unit/gapic/logging_v2/test_metrics_service_v2.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,8 @@
5151
from google.longrunning import operations_pb2 # type: ignore
5252
from google.oauth2 import service_account
5353
import google.api.distribution_pb2 as distribution_pb2 # type: ignore
54-
import google.api.label_pb2 as label_pb2 # type: ignore
55-
import google.api.launch_stage_pb2 as launch_stage_pb2 # type: ignore
5654
import google.api.metric_pb2 as metric_pb2 # type: ignore
5755
import google.auth
58-
import google.protobuf.duration_pb2 as duration_pb2 # type: ignore
5956
import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
6057

6158

packages/gapic-generator/tests/integration/goldens/logging_internal/tests/unit/gapic/logging_v2/test_logging_service_v2.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,6 @@
5353
from google.oauth2 import service_account
5454
import google.api.monitored_resource_pb2 as monitored_resource_pb2 # type: ignore
5555
import google.auth
56-
import google.logging.type.http_request_pb2 as http_request_pb2 # type: ignore
57-
import google.logging.type.log_severity_pb2 as log_severity_pb2 # type: ignore
58-
import google.protobuf.any_pb2 as any_pb2 # type: ignore
59-
import google.protobuf.duration_pb2 as duration_pb2 # type: ignore
60-
import google.protobuf.struct_pb2 as struct_pb2 # type: ignore
61-
import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
6256

6357

6458

packages/gapic-generator/tests/integration/goldens/logging_internal/tests/unit/gapic/logging_v2/test_metrics_service_v2.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,8 @@
5151
from google.longrunning import operations_pb2 # type: ignore
5252
from google.oauth2 import service_account
5353
import google.api.distribution_pb2 as distribution_pb2 # type: ignore
54-
import google.api.label_pb2 as label_pb2 # type: ignore
55-
import google.api.launch_stage_pb2 as launch_stage_pb2 # type: ignore
5654
import google.api.metric_pb2 as metric_pb2 # type: ignore
5755
import google.auth
58-
import google.protobuf.duration_pb2 as duration_pb2 # type: ignore
5956
import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
6057

6158

packages/gapic-generator/tests/integration/goldens/redis/tests/unit/gapic/redis_v1/test_cloud_redis.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,9 @@
6969
from google.oauth2 import service_account
7070
import google.api_core.operation_async as operation_async # type: ignore
7171
import google.auth
72-
import google.protobuf.duration_pb2 as duration_pb2 # type: ignore
7372
import google.protobuf.empty_pb2 as empty_pb2 # type: ignore
7473
import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore
7574
import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
76-
import google.type.dayofweek_pb2 as dayofweek_pb2 # type: ignore
77-
import google.type.timeofday_pb2 as timeofday_pb2 # type: ignore
7875

7976

8077

packages/gapic-generator/tests/integration/goldens/redis_selective/tests/unit/gapic/redis_v1/test_cloud_redis.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,9 @@
6969
from google.oauth2 import service_account
7070
import google.api_core.operation_async as operation_async # type: ignore
7171
import google.auth
72-
import google.protobuf.duration_pb2 as duration_pb2 # type: ignore
7372
import google.protobuf.empty_pb2 as empty_pb2 # type: ignore
7473
import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore
7574
import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
76-
import google.type.dayofweek_pb2 as dayofweek_pb2 # type: ignore
77-
import google.type.timeofday_pb2 as timeofday_pb2 # type: ignore
7875

7976

8077

0 commit comments

Comments
 (0)