Skip to content

Commit

Permalink
chore(logging): add trailing commas (via synth) (#9560)
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 42525f8 commit 17330db
Show file tree
Hide file tree
Showing 13 changed files with 78 additions and 78 deletions.
38 changes: 19 additions & 19 deletions logging/google/cloud/logging_v2/gapic/config_service_v2_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
from google.protobuf import field_mask_pb2


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


class ConfigServiceV2Client(object):
Expand Down Expand Up @@ -77,7 +77,7 @@ def from_service_account_file(cls, filename, *args, **kwargs):
def billing_path(cls, billing_account):
"""Return a fully-qualified billing string."""
return google.api_core.path_template.expand(
"billingAccounts/{billing_account}", billing_account=billing_account
"billingAccounts/{billing_account}", billing_account=billing_account,
)

@classmethod
Expand Down Expand Up @@ -110,7 +110,7 @@ def exclusion_path(cls, project, exclusion):
@classmethod
def folder_path(cls, folder):
"""Return a fully-qualified folder string."""
return google.api_core.path_template.expand("folders/{folder}", folder=folder)
return google.api_core.path_template.expand("folders/{folder}", folder=folder,)

@classmethod
def folder_exclusion_path(cls, folder, exclusion):
Expand All @@ -125,14 +125,14 @@ def folder_exclusion_path(cls, folder, exclusion):
def folder_sink_path(cls, folder, sink):
"""Return a fully-qualified folder_sink string."""
return google.api_core.path_template.expand(
"folders/{folder}/sinks/{sink}", folder=folder, sink=sink
"folders/{folder}/sinks/{sink}", folder=folder, sink=sink,
)

@classmethod
def organization_path(cls, organization):
"""Return a fully-qualified organization string."""
return google.api_core.path_template.expand(
"organizations/{organization}", organization=organization
"organizations/{organization}", organization=organization,
)

@classmethod
Expand All @@ -157,14 +157,14 @@ def organization_sink_path(cls, organization, sink):
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
def sink_path(cls, project, sink):
"""Return a fully-qualified sink string."""
return google.api_core.path_template.expand(
"projects/{project}/sinks/{sink}", project=project, sink=sink
"projects/{project}/sinks/{sink}", project=project, sink=sink,
)

def __init__(
Expand Down Expand Up @@ -254,12 +254,12 @@ def __init__(
self.transport = transport
else:
self.transport = config_service_v2_grpc_transport.ConfigServiceV2GrpcTransport(
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 @@ -270,7 +270,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 @@ -360,7 +360,7 @@ def list_sinks(
)

request = logging_config_pb2.ListSinksRequest(
parent=parent, page_size=page_size
parent=parent, page_size=page_size,
)
if metadata is None:
metadata = []
Expand Down Expand Up @@ -450,7 +450,7 @@ def get_sink(
client_info=self._client_info,
)

request = logging_config_pb2.GetSinkRequest(sink_name=sink_name)
request = logging_config_pb2.GetSinkRequest(sink_name=sink_name,)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down Expand Up @@ -554,7 +554,7 @@ def create_sink(
)

request = logging_config_pb2.CreateSinkRequest(
parent=parent, sink=sink, unique_writer_identity=unique_writer_identity
parent=parent, sink=sink, unique_writer_identity=unique_writer_identity,
)
if metadata is None:
metadata = []
Expand Down Expand Up @@ -759,7 +759,7 @@ def delete_sink(
client_info=self._client_info,
)

request = logging_config_pb2.DeleteSinkRequest(sink_name=sink_name)
request = logging_config_pb2.DeleteSinkRequest(sink_name=sink_name,)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down Expand Up @@ -857,7 +857,7 @@ def list_exclusions(
)

request = logging_config_pb2.ListExclusionsRequest(
parent=parent, page_size=page_size
parent=parent, page_size=page_size,
)
if metadata is None:
metadata = []
Expand Down Expand Up @@ -947,7 +947,7 @@ def get_exclusion(
client_info=self._client_info,
)

request = logging_config_pb2.GetExclusionRequest(name=name)
request = logging_config_pb2.GetExclusionRequest(name=name,)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down Expand Up @@ -1038,7 +1038,7 @@ def create_exclusion(
)

request = logging_config_pb2.CreateExclusionRequest(
parent=parent, exclusion=exclusion
parent=parent, exclusion=exclusion,
)
if metadata is None:
metadata = []
Expand Down Expand Up @@ -1142,7 +1142,7 @@ def update_exclusion(
)

request = logging_config_pb2.UpdateExclusionRequest(
name=name, exclusion=exclusion, update_mask=update_mask
name=name, exclusion=exclusion, update_mask=update_mask,
)
if metadata is None:
metadata = []
Expand Down Expand Up @@ -1218,7 +1218,7 @@ def delete_exclusion(
client_info=self._client_info,
)

request = logging_config_pb2.DeleteExclusionRequest(name=name)
request = logging_config_pb2.DeleteExclusionRequest(name=name,)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down
26 changes: 13 additions & 13 deletions logging/google/cloud/logging_v2/gapic/logging_service_v2_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
from google.protobuf import field_mask_pb2


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


class LoggingServiceV2Client(object):
Expand Down Expand Up @@ -81,7 +81,7 @@ def from_service_account_file(cls, filename, *args, **kwargs):
def billing_path(cls, billing_account):
"""Return a fully-qualified billing string."""
return google.api_core.path_template.expand(
"billingAccounts/{billing_account}", billing_account=billing_account
"billingAccounts/{billing_account}", billing_account=billing_account,
)

@classmethod
Expand All @@ -96,27 +96,27 @@ def billing_log_path(cls, billing_account, log):
@classmethod
def folder_path(cls, folder):
"""Return a fully-qualified folder string."""
return google.api_core.path_template.expand("folders/{folder}", folder=folder)
return google.api_core.path_template.expand("folders/{folder}", folder=folder,)

@classmethod
def folder_log_path(cls, folder, log):
"""Return a fully-qualified folder_log string."""
return google.api_core.path_template.expand(
"folders/{folder}/logs/{log}", folder=folder, log=log
"folders/{folder}/logs/{log}", folder=folder, log=log,
)

@classmethod
def log_path(cls, project, log):
"""Return a fully-qualified log string."""
return google.api_core.path_template.expand(
"projects/{project}/logs/{log}", project=project, log=log
"projects/{project}/logs/{log}", project=project, log=log,
)

@classmethod
def organization_path(cls, organization):
"""Return a fully-qualified organization string."""
return google.api_core.path_template.expand(
"organizations/{organization}", organization=organization
"organizations/{organization}", organization=organization,
)

@classmethod
Expand All @@ -132,7 +132,7 @@ def organization_log_path(cls, organization, log):
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,
)

def __init__(
Expand Down Expand Up @@ -222,12 +222,12 @@ def __init__(
self.transport = transport
else:
self.transport = logging_service_v2_grpc_transport.LoggingServiceV2GrpcTransport(
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 @@ -238,7 +238,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 @@ -311,7 +311,7 @@ def delete_log(
client_info=self._client_info,
)

request = logging_pb2.DeleteLogRequest(log_name=log_name)
request = logging_pb2.DeleteLogRequest(log_name=log_name,)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down Expand Up @@ -679,7 +679,7 @@ def list_monitored_resource_descriptors(
)

request = logging_pb2.ListMonitoredResourceDescriptorsRequest(
page_size=page_size
page_size=page_size,
)
iterator = google.api_core.page_iterator.GRPCIterator(
client=None,
Expand Down Expand Up @@ -776,7 +776,7 @@ def list_logs(
client_info=self._client_info,
)

request = logging_pb2.ListLogsRequest(parent=parent, page_size=page_size)
request = logging_pb2.ListLogsRequest(parent=parent, page_size=page_size,)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down
28 changes: 14 additions & 14 deletions logging/google/cloud/logging_v2/gapic/metrics_service_v2_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
from google.protobuf import field_mask_pb2


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


class MetricsServiceV2Client(object):
Expand Down Expand Up @@ -83,33 +83,33 @@ def from_service_account_file(cls, filename, *args, **kwargs):
def billing_path(cls, billing_account):
"""Return a fully-qualified billing string."""
return google.api_core.path_template.expand(
"billingAccounts/{billing_account}", billing_account=billing_account
"billingAccounts/{billing_account}", billing_account=billing_account,
)

@classmethod
def folder_path(cls, folder):
"""Return a fully-qualified folder string."""
return google.api_core.path_template.expand("folders/{folder}", folder=folder)
return google.api_core.path_template.expand("folders/{folder}", folder=folder,)

@classmethod
def metric_path(cls, project, metric):
"""Return a fully-qualified metric string."""
return google.api_core.path_template.expand(
"projects/{project}/metrics/{metric}", project=project, metric=metric
"projects/{project}/metrics/{metric}", project=project, metric=metric,
)

@classmethod
def organization_path(cls, organization):
"""Return a fully-qualified organization string."""
return google.api_core.path_template.expand(
"organizations/{organization}", organization=organization
"organizations/{organization}", organization=organization,
)

@classmethod
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,
)

def __init__(
Expand Down Expand Up @@ -199,12 +199,12 @@ def __init__(
self.transport = transport
else:
self.transport = metrics_service_v2_grpc_transport.MetricsServiceV2GrpcTransport(
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 @@ -215,7 +215,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 @@ -302,7 +302,7 @@ def list_log_metrics(
)

request = logging_metrics_pb2.ListLogMetricsRequest(
parent=parent, page_size=page_size
parent=parent, page_size=page_size,
)
if metadata is None:
metadata = []
Expand Down Expand Up @@ -387,7 +387,7 @@ def get_log_metric(
client_info=self._client_info,
)

request = logging_metrics_pb2.GetLogMetricRequest(metric_name=metric_name)
request = logging_metrics_pb2.GetLogMetricRequest(metric_name=metric_name,)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down Expand Up @@ -472,7 +472,7 @@ def create_log_metric(
)

request = logging_metrics_pb2.CreateLogMetricRequest(
parent=parent, metric=metric
parent=parent, metric=metric,
)
if metadata is None:
metadata = []
Expand Down Expand Up @@ -559,7 +559,7 @@ def update_log_metric(
)

request = logging_metrics_pb2.UpdateLogMetricRequest(
metric_name=metric_name, metric=metric
metric_name=metric_name, metric=metric,
)
if metadata is None:
metadata = []
Expand Down Expand Up @@ -630,7 +630,7 @@ def delete_log_metric(
client_info=self._client_info,
)

request = logging_metrics_pb2.DeleteLogMetricRequest(metric_name=metric_name)
request = logging_metrics_pb2.DeleteLogMetricRequest(metric_name=metric_name,)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down
Loading

0 comments on commit 17330db

Please sign in to comment.