Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
busunkim96 committed Jun 9, 2021
1 parent a61d2ed commit 7a7e2f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion gapic/schema/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down Expand Up @@ -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))
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/samplegen/test_samplegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 7a7e2f1

Please sign in to comment.