From b2f28ca716a0e8944b6a17cee4a0465ed1101316 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 29 Oct 2019 11:23:43 -0700 Subject: [PATCH] chore(bigtable): add trailing commas (via synth) (#9557) --- .../cloud/bigtable_admin_v2/__init__.py | 7 ++- .../gapic/bigtable_instance_admin_client.py | 51 +++++++++++-------- .../gapic/bigtable_table_admin_client.py | 41 ++++++++------- .../bigtable_instance_admin_grpc_transport.py | 4 +- .../bigtable_table_admin_grpc_transport.py | 4 +- .../proto/bigtable_instance_admin_pb2.py | 12 ++--- .../proto/bigtable_table_admin_pb2.py | 22 ++++---- .../bigtable_admin_v2/proto/instance_pb2.py | 8 +-- .../bigtable_admin_v2/proto/table_pb2.py | 18 +++---- bigtable/google/cloud/bigtable_v2/__init__.py | 5 +- .../bigtable_v2/gapic/bigtable_client.py | 14 ++--- .../transports/bigtable_grpc_transport.py | 6 ++- .../cloud/bigtable_v2/proto/bigtable_pb2.py | 14 ++--- .../cloud/bigtable_v2/proto/data_pb2.py | 14 ++--- bigtable/google/cloud/bigtable_v2/types.py | 13 +++-- bigtable/synth.metadata | 12 ++--- bigtable/tests/system.py | 4 +- 17 files changed, 141 insertions(+), 108 deletions(-) diff --git a/bigtable/google/cloud/bigtable_admin_v2/__init__.py b/bigtable/google/cloud/bigtable_admin_v2/__init__.py index 501d8f24d3e1..021abe2ce82b 100644 --- a/bigtable/google/cloud/bigtable_admin_v2/__init__.py +++ b/bigtable/google/cloud/bigtable_admin_v2/__init__.py @@ -35,4 +35,9 @@ class BigtableTableAdminClient(bigtable_table_admin_client.BigtableTableAdminCli enums = enums -__all__ = ("enums", "types", "BigtableInstanceAdminClient", "BigtableTableAdminClient") +__all__ = ( + "enums", + "types", + "BigtableInstanceAdminClient", + "BigtableTableAdminClient", +) diff --git a/bigtable/google/cloud/bigtable_admin_v2/gapic/bigtable_instance_admin_client.py b/bigtable/google/cloud/bigtable_admin_v2/gapic/bigtable_instance_admin_client.py index fed633c8dc6b..c0bac0768dcf 100644 --- a/bigtable/google/cloud/bigtable_admin_v2/gapic/bigtable_instance_admin_client.py +++ b/bigtable/google/cloud/bigtable_admin_v2/gapic/bigtable_instance_admin_client.py @@ -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): @@ -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__( @@ -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 @@ -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. @@ -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 = [] @@ -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) @@ -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 = [] @@ -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 = [] @@ -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 = [] @@ -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) @@ -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 = [] @@ -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) @@ -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 = [] @@ -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) @@ -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) @@ -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 = [] @@ -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 = [] @@ -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 = [] @@ -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) @@ -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 = [] diff --git a/bigtable/google/cloud/bigtable_admin_v2/gapic/bigtable_table_admin_client.py b/bigtable/google/cloud/bigtable_admin_v2/gapic/bigtable_table_admin_client.py index 96026779dbf1..bdc3f1a88749 100644 --- a/bigtable/google/cloud/bigtable_admin_v2/gapic/bigtable_table_admin_client.py +++ b/bigtable/google/cloud/bigtable_admin_v2/gapic/bigtable_table_admin_client.py @@ -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): @@ -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 @@ -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. @@ -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 = [] @@ -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 = [] @@ -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 = [] @@ -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) @@ -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) @@ -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 = [] @@ -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) @@ -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 = [] @@ -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 = [] @@ -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) @@ -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 = [] @@ -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) @@ -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 = [] @@ -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) diff --git a/bigtable/google/cloud/bigtable_admin_v2/gapic/transports/bigtable_instance_admin_grpc_transport.py b/bigtable/google/cloud/bigtable_admin_v2/gapic/transports/bigtable_instance_admin_grpc_transport.py index afb72e0c8ab9..3482193864b1 100644 --- a/bigtable/google/cloud/bigtable_admin_v2/gapic/transports/bigtable_instance_admin_grpc_transport.py +++ b/bigtable/google/cloud/bigtable_admin_v2/gapic/transports/bigtable_instance_admin_grpc_transport.py @@ -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. @@ -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 diff --git a/bigtable/google/cloud/bigtable_admin_v2/gapic/transports/bigtable_table_admin_grpc_transport.py b/bigtable/google/cloud/bigtable_admin_v2/gapic/transports/bigtable_table_admin_grpc_transport.py index 5d93e555b3b9..08e70e48b31b 100644 --- a/bigtable/google/cloud/bigtable_admin_v2/gapic/transports/bigtable_table_admin_grpc_transport.py +++ b/bigtable/google/cloud/bigtable_admin_v2/gapic/transports/bigtable_table_admin_grpc_transport.py @@ -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. @@ -85,7 +85,7 @@ def __init__( self._stubs = { "bigtable_table_admin_stub": bigtable_table_admin_pb2_grpc.BigtableTableAdminStub( channel - ) + ), } # Because this API includes a method that returns a diff --git a/bigtable/google/cloud/bigtable_admin_v2/proto/bigtable_instance_admin_pb2.py b/bigtable/google/cloud/bigtable_admin_v2/proto/bigtable_instance_admin_pb2.py index 01d3fa7e3a4d..5f0601ac2026 100644 --- a/bigtable/google/cloud/bigtable_admin_v2/proto/bigtable_instance_admin_pb2.py +++ b/bigtable/google/cloud/bigtable_admin_v2/proto/bigtable_instance_admin_pb2.py @@ -189,7 +189,7 @@ ), ], extensions=[], - nested_types=[_CREATEINSTANCEREQUEST_CLUSTERSENTRY], + nested_types=[_CREATEINSTANCEREQUEST_CLUSTERSENTRY,], enum_types=[], serialized_options=None, is_extendable=False, @@ -225,7 +225,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + ), ], extensions=[], nested_types=[], @@ -453,7 +453,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + ), ], extensions=[], nested_types=[], @@ -567,7 +567,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + ), ], extensions=[], nested_types=[], @@ -738,7 +738,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + ), ], extensions=[], nested_types=[], @@ -1170,7 +1170,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + ), ], extensions=[], nested_types=[], diff --git a/bigtable/google/cloud/bigtable_admin_v2/proto/bigtable_table_admin_pb2.py b/bigtable/google/cloud/bigtable_admin_v2/proto/bigtable_table_admin_pb2.py index c81637a34f25..f2a95d546ac3 100644 --- a/bigtable/google/cloud/bigtable_admin_v2/proto/bigtable_table_admin_pb2.py +++ b/bigtable/google/cloud/bigtable_admin_v2/proto/bigtable_table_admin_pb2.py @@ -76,7 +76,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + ), ], extensions=[], nested_types=[], @@ -171,7 +171,7 @@ ), ], extensions=[], - nested_types=[_CREATETABLEREQUEST_SPLIT], + nested_types=[_CREATETABLEREQUEST_SPLIT,], enum_types=[], serialized_options=None, is_extendable=False, @@ -334,7 +334,7 @@ index=0, containing_type=None, fields=[], - ) + ), ], serialized_start=660, serialized_end=769, @@ -572,7 +572,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + ), ], extensions=[], nested_types=[], @@ -681,7 +681,7 @@ index=0, containing_type=None, fields=[], - ) + ), ], serialized_start=1254, serialized_end=1419, @@ -732,7 +732,7 @@ ), ], extensions=[], - nested_types=[_MODIFYCOLUMNFAMILIESREQUEST_MODIFICATION], + nested_types=[_MODIFYCOLUMNFAMILIESREQUEST_MODIFICATION,], enum_types=[], serialized_options=None, is_extendable=False, @@ -768,7 +768,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + ), ], extensions=[], nested_types=[], @@ -807,7 +807,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + ), ], extensions=[], nested_types=[], @@ -903,7 +903,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + ), ], extensions=[], nested_types=[], @@ -1053,7 +1053,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + ), ], extensions=[], nested_types=[], @@ -1224,7 +1224,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + ), ], extensions=[], nested_types=[], diff --git a/bigtable/google/cloud/bigtable_admin_v2/proto/instance_pb2.py b/bigtable/google/cloud/bigtable_admin_v2/proto/instance_pb2.py index 49164dfe6693..ef3a7ce7858b 100644 --- a/bigtable/google/cloud/bigtable_admin_v2/proto/instance_pb2.py +++ b/bigtable/google/cloud/bigtable_admin_v2/proto/instance_pb2.py @@ -281,8 +281,8 @@ ), ], extensions=[], - nested_types=[_INSTANCE_LABELSENTRY], - enum_types=[_INSTANCE_STATE, _INSTANCE_TYPE], + nested_types=[_INSTANCE_LABELSENTRY,], + enum_types=[_INSTANCE_STATE, _INSTANCE_TYPE,], serialized_options=None, is_extendable=False, syntax="proto3", @@ -393,7 +393,7 @@ ], extensions=[], nested_types=[], - enum_types=[_CLUSTER_STATE], + enum_types=[_CLUSTER_STATE,], serialized_options=None, is_extendable=False, syntax="proto3", @@ -594,7 +594,7 @@ index=0, containing_type=None, fields=[], - ) + ), ], serialized_start=826, serialized_end=1212, diff --git a/bigtable/google/cloud/bigtable_admin_v2/proto/table_pb2.py b/bigtable/google/cloud/bigtable_admin_v2/proto/table_pb2.py index e15dd2ba5b3f..c348fe4a280f 100644 --- a/bigtable/google/cloud/bigtable_admin_v2/proto/table_pb2.py +++ b/bigtable/google/cloud/bigtable_admin_v2/proto/table_pb2.py @@ -192,11 +192,11 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + ), ], extensions=[], nested_types=[], - enum_types=[_TABLE_CLUSTERSTATE_REPLICATIONSTATE], + enum_types=[_TABLE_CLUSTERSTATE_REPLICATIONSTATE,], serialized_options=None, is_extendable=False, syntax="proto3", @@ -404,7 +404,7 @@ _TABLE_CLUSTERSTATESENTRY, _TABLE_COLUMNFAMILIESENTRY, ], - enum_types=[_TABLE_TIMESTAMPGRANULARITY, _TABLE_VIEW], + enum_types=[_TABLE_TIMESTAMPGRANULARITY, _TABLE_VIEW,], serialized_options=None, is_extendable=False, syntax="proto3", @@ -439,7 +439,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + ), ], extensions=[], nested_types=[], @@ -478,7 +478,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + ), ], extensions=[], nested_types=[], @@ -516,7 +516,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + ), ], extensions=[], nested_types=[], @@ -611,7 +611,7 @@ ), ], extensions=[], - nested_types=[_GCRULE_INTERSECTION, _GCRULE_UNION], + nested_types=[_GCRULE_INTERSECTION, _GCRULE_UNION,], enum_types=[], serialized_options=None, is_extendable=False, @@ -624,7 +624,7 @@ index=0, containing_type=None, fields=[], - ) + ), ], serialized_start=1087, serialized_end=1428, @@ -767,7 +767,7 @@ ], extensions=[], nested_types=[], - enum_types=[_SNAPSHOT_STATE], + enum_types=[_SNAPSHOT_STATE,], serialized_options=None, is_extendable=False, syntax="proto3", diff --git a/bigtable/google/cloud/bigtable_v2/__init__.py b/bigtable/google/cloud/bigtable_v2/__init__.py index ca18668ce49b..216ef8fb1daa 100644 --- a/bigtable/google/cloud/bigtable_v2/__init__.py +++ b/bigtable/google/cloud/bigtable_v2/__init__.py @@ -25,4 +25,7 @@ class BigtableClient(bigtable_client.BigtableClient): __doc__ = bigtable_client.BigtableClient.__doc__ -__all__ = ("types", "BigtableClient") +__all__ = ( + "types", + "BigtableClient", +) diff --git a/bigtable/google/cloud/bigtable_v2/gapic/bigtable_client.py b/bigtable/google/cloud/bigtable_v2/gapic/bigtable_client.py index 36021068dfd8..b13faac448c1 100644 --- a/bigtable/google/cloud/bigtable_v2/gapic/bigtable_client.py +++ b/bigtable/google/cloud/bigtable_v2/gapic/bigtable_client.py @@ -36,7 +36,9 @@ from google.cloud.bigtable_v2.proto import data_pb2 -_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("google-cloud-bigtable").version +_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution( + "google-cloud-bigtable", +).version class BigtableClient(object): @@ -166,12 +168,12 @@ def __init__( self.transport = transport else: self.transport = bigtable_grpc_transport.BigtableGrpcTransport( - 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 @@ -182,7 +184,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. @@ -352,7 +354,7 @@ def sample_row_keys( ) request = bigtable_pb2.SampleRowKeysRequest( - table_name=table_name, app_profile_id=app_profile_id + table_name=table_name, app_profile_id=app_profile_id, ) if metadata is None: metadata = [] @@ -537,7 +539,7 @@ def mutate_rows( ) request = bigtable_pb2.MutateRowsRequest( - table_name=table_name, entries=entries, app_profile_id=app_profile_id + table_name=table_name, entries=entries, app_profile_id=app_profile_id, ) if metadata is None: metadata = [] diff --git a/bigtable/google/cloud/bigtable_v2/gapic/transports/bigtable_grpc_transport.py b/bigtable/google/cloud/bigtable_v2/gapic/transports/bigtable_grpc_transport.py index 4c34d5fb1b39..3c30df704a57 100644 --- a/bigtable/google/cloud/bigtable_v2/gapic/transports/bigtable_grpc_transport.py +++ b/bigtable/google/cloud/bigtable_v2/gapic/transports/bigtable_grpc_transport.py @@ -60,7 +60,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. @@ -78,7 +78,9 @@ def __init__( # gRPC uses objects called "stubs" that are bound to the # channel and provide a basic method for each RPC. - self._stubs = {"bigtable_stub": bigtable_pb2_grpc.BigtableStub(channel)} + self._stubs = { + "bigtable_stub": bigtable_pb2_grpc.BigtableStub(channel), + } @classmethod def create_channel( diff --git a/bigtable/google/cloud/bigtable_v2/proto/bigtable_pb2.py b/bigtable/google/cloud/bigtable_v2/proto/bigtable_pb2.py index 1c2b0f1ae134..4e4ab84e1cc8 100644 --- a/bigtable/google/cloud/bigtable_v2/proto/bigtable_pb2.py +++ b/bigtable/google/cloud/bigtable_v2/proto/bigtable_pb2.py @@ -337,7 +337,7 @@ index=0, containing_type=None, fields=[], - ) + ), ], serialized_start=488, serialized_end=749, @@ -388,7 +388,7 @@ ), ], extensions=[], - nested_types=[_READROWSRESPONSE_CELLCHUNK], + nested_types=[_READROWSRESPONSE_CELLCHUNK,], enum_types=[], serialized_options=None, is_extendable=False, @@ -746,7 +746,7 @@ ), ], extensions=[], - nested_types=[_MUTATEROWSREQUEST_ENTRY], + nested_types=[_MUTATEROWSREQUEST_ENTRY,], enum_types=[], serialized_options=None, is_extendable=False, @@ -838,10 +838,10 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + ), ], extensions=[], - nested_types=[_MUTATEROWSRESPONSE_ENTRY], + nested_types=[_MUTATEROWSRESPONSE_ENTRY,], enum_types=[], serialized_options=None, is_extendable=False, @@ -1006,7 +1006,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + ), ], extensions=[], nested_types=[], @@ -1138,7 +1138,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + ), ], extensions=[], nested_types=[], diff --git a/bigtable/google/cloud/bigtable_v2/proto/data_pb2.py b/bigtable/google/cloud/bigtable_v2/proto/data_pb2.py index 8e5cff816455..825a0fa9222f 100644 --- a/bigtable/google/cloud/bigtable_v2/proto/data_pb2.py +++ b/bigtable/google/cloud/bigtable_v2/proto/data_pb2.py @@ -754,7 +754,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + ), ], extensions=[], nested_types=[], @@ -792,7 +792,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + ), ], extensions=[], nested_types=[], @@ -1231,7 +1231,7 @@ ), ], extensions=[], - nested_types=[_ROWFILTER_CHAIN, _ROWFILTER_INTERLEAVE, _ROWFILTER_CONDITION], + nested_types=[_ROWFILTER_CHAIN, _ROWFILTER_INTERLEAVE, _ROWFILTER_CONDITION,], enum_types=[], serialized_options=None, is_extendable=False, @@ -1244,7 +1244,7 @@ index=0, containing_type=None, fields=[], - ) + ), ], serialized_start=991, serialized_end=2110, @@ -1441,7 +1441,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + ), ], extensions=[], nested_types=[], @@ -1573,7 +1573,7 @@ index=0, containing_type=None, fields=[], - ) + ), ], serialized_start=2113, serialized_end=2698, @@ -1674,7 +1674,7 @@ index=0, containing_type=None, fields=[], - ) + ), ], serialized_start=2701, serialized_end=2829, diff --git a/bigtable/google/cloud/bigtable_v2/types.py b/bigtable/google/cloud/bigtable_v2/types.py index 53937c1d1687..a445eae1cade 100644 --- a/bigtable/google/cloud/bigtable_v2/types.py +++ b/bigtable/google/cloud/bigtable_v2/types.py @@ -27,9 +27,16 @@ from google.rpc import status_pb2 -_shared_modules = [any_pb2, wrappers_pb2, status_pb2] - -_local_modules = [bigtable_pb2, data_pb2] +_shared_modules = [ + any_pb2, + wrappers_pb2, + status_pb2, +] + +_local_modules = [ + bigtable_pb2, + data_pb2, +] names = [] diff --git a/bigtable/synth.metadata b/bigtable/synth.metadata index a7291727fa94..25c44a96331d 100644 --- a/bigtable/synth.metadata +++ b/bigtable/synth.metadata @@ -1,26 +1,26 @@ { - "updateTime": "2019-09-04T12:14:03.458374Z", + "updateTime": "2019-10-29T12:15:54.915199Z", "sources": [ { "generator": { "name": "artman", - "version": "0.36.2", - "dockerImage": "googleapis/artman@sha256:0e6f3a668cd68afc768ecbe08817cf6e56a0e64fcbdb1c58c3b97492d12418a1" + "version": "0.40.3", + "dockerImage": "googleapis/artman@sha256:c805f50525f5f557886c94ab76f56eaa09cb1da58c3ee95111fd34259376621a" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "a2158681f6e30c5fd9446eb1fd7b5021a6d48bfa", - "internalRef": "266999433" + "sha": "532773acbed8d09451dafb3d403ab1823e6a6e1e", + "internalRef": "277177415" } }, { "template": { "name": "python_library", "origin": "synthtool.gcp", - "version": "2019.5.2" + "version": "2019.10.17" } } ], diff --git a/bigtable/tests/system.py b/bigtable/tests/system.py index 28d95d985ffe..ae43bb10ecdf 100644 --- a/bigtable/tests/system.py +++ b/bigtable/tests/system.py @@ -1076,8 +1076,8 @@ def test_read_with_label_applied(self): # Make sure COLUMN_FAMILY_ID1 was the only key. self.assertEqual(len(cells_returned), 0) - cell1_new, = col_fam1.pop(COL_NAME1) - cell3_new, = col_fam1.pop(COL_NAME2) + (cell1_new,) = col_fam1.pop(COL_NAME1) + (cell3_new,) = col_fam1.pop(COL_NAME2) # Make sure COL_NAME1 and COL_NAME2 were the only keys. self.assertEqual(len(col_fam1), 0)