Skip to content

Commit

Permalink
chore(bigtable): add trailing commas (via synth) (#9557)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and tseaver committed Oct 29, 2019
1 parent dfc8a80 commit b2f28ca
Show file tree
Hide file tree
Showing 17 changed files with 141 additions and 108 deletions.
7 changes: 6 additions & 1 deletion bigtable/google/cloud/bigtable_admin_v2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,9 @@ class BigtableTableAdminClient(bigtable_table_admin_client.BigtableTableAdminCli
enums = enums


__all__ = ("enums", "types", "BigtableInstanceAdminClient", "BigtableTableAdminClient")
__all__ = (
"enums",
"types",
"BigtableInstanceAdminClient",
"BigtableTableAdminClient",
)
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@
from google.protobuf import field_mask_pb2


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


class BigtableInstanceAdminClient(object):
Expand Down Expand Up @@ -128,7 +130,7 @@ def location_path(cls, project, location):
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 @@ -218,12 +220,12 @@ def __init__(
self.transport = transport
else:
self.transport = bigtable_instance_admin_grpc_transport.BigtableInstanceAdminGrpcTransport(
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 @@ -234,7 +236,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 @@ -333,7 +335,10 @@ def create_instance(
)

request = bigtable_instance_admin_pb2.CreateInstanceRequest(
parent=parent, instance_id=instance_id, instance=instance, clusters=clusters
parent=parent,
instance_id=instance_id,
instance=instance,
clusters=clusters,
)
if metadata is None:
metadata = []
Expand Down Expand Up @@ -410,7 +415,7 @@ def get_instance(
client_info=self._client_info,
)

request = bigtable_instance_admin_pb2.GetInstanceRequest(name=name)
request = bigtable_instance_admin_pb2.GetInstanceRequest(name=name,)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down Expand Up @@ -483,7 +488,7 @@ def list_instances(
)

request = bigtable_instance_admin_pb2.ListInstancesRequest(
parent=parent, page_token=page_token
parent=parent, page_token=page_token,
)
if metadata is None:
metadata = []
Expand Down Expand Up @@ -586,7 +591,11 @@ def update_instance(
)

request = instance_pb2.Instance(
name=name, display_name=display_name, type=type_, labels=labels, state=state
name=name,
display_name=display_name,
type=type_,
labels=labels,
state=state,
)
if metadata is None:
metadata = []
Expand Down Expand Up @@ -679,7 +688,7 @@ def partial_update_instance(
)

request = bigtable_instance_admin_pb2.PartialUpdateInstanceRequest(
instance=instance, update_mask=update_mask
instance=instance, update_mask=update_mask,
)
if metadata is None:
metadata = []
Expand Down Expand Up @@ -753,7 +762,7 @@ def delete_instance(
client_info=self._client_info,
)

request = bigtable_instance_admin_pb2.DeleteInstanceRequest(name=name)
request = bigtable_instance_admin_pb2.DeleteInstanceRequest(name=name,)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down Expand Up @@ -849,7 +858,7 @@ def create_cluster(
)

request = bigtable_instance_admin_pb2.CreateClusterRequest(
parent=parent, cluster_id=cluster_id, cluster=cluster
parent=parent, cluster_id=cluster_id, cluster=cluster,
)
if metadata is None:
metadata = []
Expand Down Expand Up @@ -926,7 +935,7 @@ def get_cluster(
client_info=self._client_info,
)

request = bigtable_instance_admin_pb2.GetClusterRequest(name=name)
request = bigtable_instance_admin_pb2.GetClusterRequest(name=name,)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down Expand Up @@ -1002,7 +1011,7 @@ def list_clusters(
)

request = bigtable_instance_admin_pb2.ListClustersRequest(
parent=parent, page_token=page_token
parent=parent, page_token=page_token,
)
if metadata is None:
metadata = []
Expand Down Expand Up @@ -1177,7 +1186,7 @@ def delete_cluster(
client_info=self._client_info,
)

request = bigtable_instance_admin_pb2.DeleteClusterRequest(name=name)
request = bigtable_instance_admin_pb2.DeleteClusterRequest(name=name,)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down Expand Up @@ -1340,7 +1349,7 @@ def get_app_profile(
client_info=self._client_info,
)

request = bigtable_instance_admin_pb2.GetAppProfileRequest(name=name)
request = bigtable_instance_admin_pb2.GetAppProfileRequest(name=name,)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down Expand Up @@ -1432,7 +1441,7 @@ def list_app_profiles(
)

request = bigtable_instance_admin_pb2.ListAppProfilesRequest(
parent=parent, page_size=page_size
parent=parent, page_size=page_size,
)
if metadata is None:
metadata = []
Expand Down Expand Up @@ -1620,7 +1629,7 @@ def delete_app_profile(
)

request = bigtable_instance_admin_pb2.DeleteAppProfileRequest(
name=name, ignore_warnings=ignore_warnings
name=name, ignore_warnings=ignore_warnings,
)
if metadata is None:
metadata = []
Expand Down Expand Up @@ -1699,7 +1708,7 @@ def get_iam_policy(
)

request = iam_policy_pb2.GetIamPolicyRequest(
resource=resource, options=options_
resource=resource, options=options_,
)
if metadata is None:
metadata = []
Expand Down Expand Up @@ -1782,7 +1791,7 @@ def set_iam_policy(
client_info=self._client_info,
)

request = iam_policy_pb2.SetIamPolicyRequest(resource=resource, policy=policy)
request = iam_policy_pb2.SetIamPolicyRequest(resource=resource, policy=policy,)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down Expand Up @@ -1861,7 +1870,7 @@ def test_iam_permissions(
)

request = iam_policy_pb2.TestIamPermissionsRequest(
resource=resource, permissions=permissions
resource=resource, permissions=permissions,
)
if metadata is None:
metadata = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@
from google.protobuf import field_mask_pb2


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


class BigtableTableAdminClient(object):
Expand Down Expand Up @@ -220,12 +222,12 @@ def __init__(
self.transport = transport
else:
self.transport = bigtable_table_admin_grpc_transport.BigtableTableAdminGrpcTransport(
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 @@ -236,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 @@ -337,7 +339,10 @@ def create_table(
)

request = bigtable_table_admin_pb2.CreateTableRequest(
parent=parent, table_id=table_id, table=table, initial_splits=initial_splits
parent=parent,
table_id=table_id,
table=table,
initial_splits=initial_splits,
)
if metadata is None:
metadata = []
Expand Down Expand Up @@ -439,7 +444,7 @@ def create_table_from_snapshot(
)

request = bigtable_table_admin_pb2.CreateTableFromSnapshotRequest(
parent=parent, table_id=table_id, source_snapshot=source_snapshot
parent=parent, table_id=table_id, source_snapshot=source_snapshot,
)
if metadata is None:
metadata = []
Expand Down Expand Up @@ -538,7 +543,7 @@ def list_tables(
)

request = bigtable_table_admin_pb2.ListTablesRequest(
parent=parent, view=view, page_size=page_size
parent=parent, view=view, page_size=page_size,
)
if metadata is None:
metadata = []
Expand Down Expand Up @@ -623,7 +628,7 @@ def get_table(
client_info=self._client_info,
)

request = bigtable_table_admin_pb2.GetTableRequest(name=name, view=view)
request = bigtable_table_admin_pb2.GetTableRequest(name=name, view=view,)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down Expand Up @@ -690,7 +695,7 @@ def delete_table(
client_info=self._client_info,
)

request = bigtable_table_admin_pb2.DeleteTableRequest(name=name)
request = bigtable_table_admin_pb2.DeleteTableRequest(name=name,)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down Expand Up @@ -776,7 +781,7 @@ def modify_column_families(
)

request = bigtable_table_admin_pb2.ModifyColumnFamiliesRequest(
name=name, modifications=modifications
name=name, modifications=modifications,
)
if metadata is None:
metadata = []
Expand Down Expand Up @@ -939,7 +944,7 @@ def generate_consistency_token(
client_info=self._client_info,
)

request = bigtable_table_admin_pb2.GenerateConsistencyTokenRequest(name=name)
request = bigtable_table_admin_pb2.GenerateConsistencyTokenRequest(name=name,)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down Expand Up @@ -1018,7 +1023,7 @@ def check_consistency(
)

request = bigtable_table_admin_pb2.CheckConsistencyRequest(
name=name, consistency_token=consistency_token
name=name, consistency_token=consistency_token,
)
if metadata is None:
metadata = []
Expand Down Expand Up @@ -1097,7 +1102,7 @@ def get_iam_policy(
)

request = iam_policy_pb2.GetIamPolicyRequest(
resource=resource, options=options_
resource=resource, options=options_,
)
if metadata is None:
metadata = []
Expand Down Expand Up @@ -1180,7 +1185,7 @@ def set_iam_policy(
client_info=self._client_info,
)

request = iam_policy_pb2.SetIamPolicyRequest(resource=resource, policy=policy)
request = iam_policy_pb2.SetIamPolicyRequest(resource=resource, policy=policy,)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down Expand Up @@ -1259,7 +1264,7 @@ def test_iam_permissions(
)

request = iam_policy_pb2.TestIamPermissionsRequest(
resource=resource, permissions=permissions
resource=resource, permissions=permissions,
)
if metadata is None:
metadata = []
Expand Down Expand Up @@ -1462,7 +1467,7 @@ def get_snapshot(
client_info=self._client_info,
)

request = bigtable_table_admin_pb2.GetSnapshotRequest(name=name)
request = bigtable_table_admin_pb2.GetSnapshotRequest(name=name,)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down Expand Up @@ -1563,7 +1568,7 @@ def list_snapshots(
)

request = bigtable_table_admin_pb2.ListSnapshotsRequest(
parent=parent, page_size=page_size
parent=parent, page_size=page_size,
)
if metadata is None:
metadata = []
Expand Down Expand Up @@ -1648,7 +1653,7 @@ def delete_snapshot(
client_info=self._client_info,
)

request = bigtable_table_admin_pb2.DeleteSnapshotRequest(name=name)
request = bigtable_table_admin_pb2.DeleteSnapshotRequest(name=name,)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,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 @@ -85,7 +85,7 @@ def __init__(
self._stubs = {
"bigtable_instance_admin_stub": bigtable_instance_admin_pb2_grpc.BigtableInstanceAdminStub(
channel
)
),
}

# Because this API includes a method that returns a
Expand Down
Loading

0 comments on commit b2f28ca

Please sign in to comment.