From 7a7e2f115a9406939c687220523f2413e898d821 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Wed, 9 Jun 2021 22:46:34 +0000 Subject: [PATCH] chore: format --- gapic/schema/api.py | 4 +++- tests/unit/samplegen/test_samplegen.py | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gapic/schema/api.py b/gapic/schema/api.py index 434876a024..cdfb5ca6e7 100644 --- a/gapic/schema/api.py +++ b/gapic/schema/api.py @@ -49,6 +49,7 @@ TRANSPORT_GRPC_ASYNC = "grpc-async" TRANSPORT_REST = "rest" + @dataclasses.dataclass(frozen=True) class Proto: """A representation of a particular proto file within an API.""" @@ -419,7 +420,8 @@ def gapic_metadata(self, options: Options) -> gapic_metadata_pb2.GapicMetadata: transports = [] if "grpc" in options.transport: transports.append((TRANSPORT_GRPC, service.client_name)) - transports.append((TRANSPORT_GRPC_ASYNC, service.async_client_name)) + transports.append( + (TRANSPORT_GRPC_ASYNC, service.async_client_name)) if "rest" in options.transport: transports.append((TRANSPORT_REST, service.client_name)) diff --git a/tests/unit/samplegen/test_samplegen.py b/tests/unit/samplegen/test_samplegen.py index 2226235ce3..73798ce842 100644 --- a/tests/unit/samplegen/test_samplegen.py +++ b/tests/unit/samplegen/test_samplegen.py @@ -1910,7 +1910,8 @@ def test_generate_sample_spec_basic(): ] ) opts = Options.build("transport=grpc") - specs = sorted(samplegen.generate_sample_specs(api_schema, opts=opts), key=lambda x: x["transport"]) + specs = sorted(samplegen.generate_sample_specs( + api_schema, opts=opts), key=lambda x: x["transport"]) specs.sort(key=lambda x: x["transport"]) assert len(specs) == 2