Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

Commit

Permalink
chore(trace): add trailing commas (via synth) (#9562)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and busunkim96 committed Oct 29, 2019
1 parent a5b4f7a commit 376575b
Show file tree
Hide file tree
Showing 12 changed files with 69 additions and 43 deletions.
4 changes: 2 additions & 2 deletions docs/conf.py
Expand Up @@ -264,7 +264,7 @@
u"google-cloud-trace Documentation",
author,
"manual",
)
),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down Expand Up @@ -314,7 +314,7 @@
"google-cloud-trace",
"GAPIC library for the {metadata.shortName} v2 service",
"APIs",
)
),
]

# Documents to append as an appendix to all manuals.
Expand Down
6 changes: 5 additions & 1 deletion google/cloud/trace_v1/__init__.py
Expand Up @@ -27,4 +27,8 @@ class TraceServiceClient(trace_service_client.TraceServiceClient):
enums = enums


__all__ = ("enums", "types", "TraceServiceClient")
__all__ = (
"enums",
"types",
"TraceServiceClient",
)
12 changes: 6 additions & 6 deletions google/cloud/trace_v1/gapic/trace_service_client.py
Expand Up @@ -39,7 +39,7 @@
from google.protobuf import timestamp_pb2


_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("google-cloud-trace").version
_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("google-cloud-trace",).version


class TraceServiceClient(object):
Expand Down Expand Up @@ -165,12 +165,12 @@ def __init__(
self.transport = transport
else:
self.transport = trace_service_grpc_transport.TraceServiceGrpcTransport(
address=api_endpoint, channel=channel, credentials=credentials
address=api_endpoint, channel=channel, credentials=credentials,
)

if client_info is None:
client_info = google.api_core.gapic_v1.client_info.ClientInfo(
gapic_version=_GAPIC_LIBRARY_VERSION
gapic_version=_GAPIC_LIBRARY_VERSION,
)
else:
client_info.gapic_version = _GAPIC_LIBRARY_VERSION
Expand All @@ -181,7 +181,7 @@ def __init__(
# (Ordinarily, these are the defaults specified in the `*_config.py`
# file next to this one.)
self._method_configs = google.api_core.gapic_v1.config.parse_method_configs(
client_config["interfaces"][self._INTERFACE_NAME]
client_config["interfaces"][self._INTERFACE_NAME],
)

# Save a dictionary of cached API call functions.
Expand Down Expand Up @@ -252,7 +252,7 @@ def patch_traces(
client_info=self._client_info,
)

request = trace_pb2.PatchTracesRequest(project_id=project_id, traces=traces)
request = trace_pb2.PatchTracesRequest(project_id=project_id, traces=traces,)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down Expand Up @@ -327,7 +327,7 @@ def get_trace(
client_info=self._client_info,
)

request = trace_pb2.GetTraceRequest(project_id=project_id, trace_id=trace_id)
request = trace_pb2.GetTraceRequest(project_id=project_id, trace_id=trace_id,)
return self._inner_api_calls["get_trace"](
request, retry=retry, timeout=timeout, metadata=metadata
)
Expand Down
Expand Up @@ -57,7 +57,7 @@ def __init__(
# exception (channels come with credentials baked in already).
if channel is not None and credentials is not None:
raise ValueError(
"The `channel` and `credentials` arguments are mutually " "exclusive."
"The `channel` and `credentials` arguments are mutually " "exclusive.",
)

# Create the channel.
Expand All @@ -75,7 +75,9 @@ def __init__(

# gRPC uses objects called "stubs" that are bound to the
# channel and provide a basic method for each RPC.
self._stubs = {"trace_service_stub": trace_pb2_grpc.TraceServiceStub(channel)}
self._stubs = {
"trace_service_stub": trace_pb2_grpc.TraceServiceStub(channel),
}

@classmethod
def create_channel(
Expand Down
8 changes: 4 additions & 4 deletions google/cloud/trace_v1/proto/trace_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions google/cloud/trace_v1/types.py
Expand Up @@ -25,9 +25,14 @@
from google.protobuf import timestamp_pb2


_shared_modules = [empty_pb2, timestamp_pb2]

_local_modules = [trace_pb2]
_shared_modules = [
empty_pb2,
timestamp_pb2,
]

_local_modules = [
trace_pb2,
]

names = []

Expand Down
6 changes: 5 additions & 1 deletion google/cloud/trace_v2/__init__.py
Expand Up @@ -27,4 +27,8 @@ class TraceServiceClient(trace_service_client.TraceServiceClient):
enums = enums


__all__ = ("enums", "types", "TraceServiceClient")
__all__ = (
"enums",
"types",
"TraceServiceClient",
)
12 changes: 6 additions & 6 deletions google/cloud/trace_v2/gapic/trace_service_client.py
Expand Up @@ -41,7 +41,7 @@
from google.rpc import status_pb2


_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("google-cloud-trace").version
_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("google-cloud-trace",).version


class TraceServiceClient(object):
Expand Down Expand Up @@ -84,7 +84,7 @@ def from_service_account_file(cls, filename, *args, **kwargs):
def project_path(cls, project):
"""Return a fully-qualified project string."""
return google.api_core.path_template.expand(
"projects/{project}", project=project
"projects/{project}", project=project,
)

@classmethod
Expand Down Expand Up @@ -184,12 +184,12 @@ def __init__(
self.transport = transport
else:
self.transport = trace_service_grpc_transport.TraceServiceGrpcTransport(
address=api_endpoint, channel=channel, credentials=credentials
address=api_endpoint, channel=channel, credentials=credentials,
)

if client_info is None:
client_info = google.api_core.gapic_v1.client_info.ClientInfo(
gapic_version=_GAPIC_LIBRARY_VERSION
gapic_version=_GAPIC_LIBRARY_VERSION,
)
else:
client_info.gapic_version = _GAPIC_LIBRARY_VERSION
Expand All @@ -200,7 +200,7 @@ def __init__(
# (Ordinarily, these are the defaults specified in the `*_config.py`
# file next to this one.)
self._method_configs = google.api_core.gapic_v1.config.parse_method_configs(
client_config["interfaces"][self._INTERFACE_NAME]
client_config["interfaces"][self._INTERFACE_NAME],
)

# Save a dictionary of cached API call functions.
Expand Down Expand Up @@ -269,7 +269,7 @@ def batch_write_spans(
client_info=self._client_info,
)

request = tracing_pb2.BatchWriteSpansRequest(name=name, spans=spans)
request = tracing_pb2.BatchWriteSpansRequest(name=name, spans=spans,)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down
Expand Up @@ -56,7 +56,7 @@ def __init__(
# exception (channels come with credentials baked in already).
if channel is not None and credentials is not None:
raise ValueError(
"The `channel` and `credentials` arguments are mutually " "exclusive."
"The `channel` and `credentials` arguments are mutually " "exclusive.",
)

# Create the channel.
Expand All @@ -74,7 +74,9 @@ def __init__(

# gRPC uses objects called "stubs" that are bound to the
# channel and provide a basic method for each RPC.
self._stubs = {"trace_service_stub": tracing_pb2_grpc.TraceServiceStub(channel)}
self._stubs = {
"trace_service_stub": tracing_pb2_grpc.TraceServiceStub(channel),
}

@classmethod
def create_channel(
Expand Down
14 changes: 7 additions & 7 deletions google/cloud/trace_v2/proto/trace_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 12 additions & 3 deletions google/cloud/trace_v2/types.py
Expand Up @@ -29,9 +29,18 @@
from google.rpc import status_pb2


_shared_modules = [any_pb2, empty_pb2, timestamp_pb2, wrappers_pb2, status_pb2]

_local_modules = [trace_pb2, tracing_pb2]
_shared_modules = [
any_pb2,
empty_pb2,
timestamp_pb2,
wrappers_pb2,
status_pb2,
]

_local_modules = [
trace_pb2,
tracing_pb2,
]

names = []

Expand Down
12 changes: 6 additions & 6 deletions synth.metadata
@@ -1,26 +1,26 @@
{
"updateTime": "2019-10-05T12:41:04.385466Z",
"updateTime": "2019-10-29T12:42:54.805714Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.38.0",
"dockerImage": "googleapis/artman@sha256:0d2f8d429110aeb8d82df6550ef4ede59d40df9062d260a1580fce688b0512bf"
"version": "0.40.3",
"dockerImage": "googleapis/artman@sha256:c805f50525f5f557886c94ab76f56eaa09cb1da58c3ee95111fd34259376621a"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "ceb8e2fb12f048cc94caae532ef0b4cf026a78f3",
"internalRef": "272971705"
"sha": "532773acbed8d09451dafb3d403ab1823e6a6e1e",
"internalRef": "277177415"
}
},
{
"template": {
"name": "python_library",
"origin": "synthtool.gcp",
"version": "2019.5.2"
"version": "2019.10.17"
}
}
],
Expand Down

0 comments on commit 376575b

Please sign in to comment.