Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit dc37aea

Browse files
chore: code formatting (#117)
autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters.
1 parent dfe658a commit dc37aea

24 files changed

Lines changed: 262 additions & 144 deletions

docs/conf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,10 @@
346346
intersphinx_mapping = {
347347
"python": ("http://python.readthedocs.org/en/latest/", None),
348348
"google-auth": ("https://google-auth.readthedocs.io/en/stable", None),
349-
"google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,),
349+
"google.api_core": (
350+
"https://googleapis.dev/python/google-api-core/latest/",
351+
None,
352+
),
350353
"grpc": ("https://grpc.io/grpc/python/", None),
351354
}
352355

google/cloud/bigtable/backup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def size_bytes(self):
208208

209209
@property
210210
def state(self):
211-
""" The current state of this Backup.
211+
"""The current state of this Backup.
212212
213213
:rtype: :class:`~google.cloud.bigtable_admin_v2.gapic.enums.Backup.State`
214214
:returns: The current state of this Backup.
@@ -358,7 +358,8 @@ def update_expire_time(self, new_expire_time):
358358
:param new_expire_time: the new expiration time timestamp
359359
"""
360360
backup_update = table_pb2.Backup(
361-
name=self.name, expire_time=_datetime_to_pb_timestamp(new_expire_time),
361+
name=self.name,
362+
expire_time=_datetime_to_pb_timestamp(new_expire_time),
362363
)
363364
update_mask = field_mask_pb2.FieldMask(paths=["expire_time"])
364365
api = self._instance._client.table_admin_client

google/cloud/bigtable/batcher.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class MaxMutationsError(ValueError):
2525

2626

2727
class MutationsBatcher(object):
28-
""" A MutationsBatcher is used in batch cases where the number of mutations
28+
"""A MutationsBatcher is used in batch cases where the number of mutations
2929
is large or unknown. It will store DirectRows in memory until one of the
3030
size limits is reached, or an explicit call to flush() is performed. When
3131
a flush event occurs, the DirectRows in memory will be sent to Cloud
@@ -65,7 +65,7 @@ def __init__(self, table, flush_count=FLUSH_COUNT, max_row_bytes=MAX_ROW_BYTES):
6565
self.max_row_bytes = max_row_bytes
6666

6767
def mutate(self, row):
68-
""" Add a row to the batch. If the current batch meets one of the size
68+
"""Add a row to the batch. If the current batch meets one of the size
6969
limits, the batch is sent synchronously.
7070
7171
For example:
@@ -105,7 +105,7 @@ def mutate(self, row):
105105
self.flush()
106106

107107
def mutate_rows(self, rows):
108-
""" Add a row to the batch. If the current batch meets one of the size
108+
"""Add a row to the batch. If the current batch meets one of the size
109109
limits, the batch is sent synchronously.
110110
111111
For example:
@@ -130,7 +130,7 @@ def mutate_rows(self, rows):
130130
self.mutate(row)
131131

132132
def flush(self):
133-
""" Sends the current. batch to Cloud Bigtable.
133+
"""Sends the current. batch to Cloud Bigtable.
134134
For example:
135135
136136
.. literalinclude:: snippets.py

google/cloud/bigtable/client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,9 @@ def __init__(
175175
self._channel = channel
176176
self.SCOPE = self._get_scopes()
177177
super(Client, self).__init__(
178-
project=project, credentials=credentials, client_options=client_options,
178+
project=project,
179+
credentials=credentials,
180+
client_options=client_options,
179181
)
180182

181183
def _get_scopes(self):

google/cloud/bigtable/row.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ def _get_mutations(self, state=None): # pylint: disable=unused-argument
295295
return self._pb_mutations
296296

297297
def get_mutations_size(self):
298-
""" Gets the total mutations size for current row
298+
"""Gets the total mutations size for current row
299299
300300
For example:
301301

google/cloud/bigtable/row_data.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ def _copy_from_previous(self, cell):
595595

596596

597597
class _ReadRowsRequestManager(object):
598-
""" Update the ReadRowsRequest message in case of failures by
598+
"""Update the ReadRowsRequest message in case of failures by
599599
filtering the already read keys.
600600
601601
:type message: class:`data_messages_v2_pb2.ReadRowsRequest`
@@ -617,8 +617,7 @@ def __init__(self, message, last_scanned_key, rows_read_so_far):
617617
self.rows_read_so_far = rows_read_so_far
618618

619619
def build_updated_request(self):
620-
""" Updates the given message request as per last scanned key
621-
"""
620+
"""Updates the given message request as per last scanned key"""
622621
r_kwargs = {
623622
"table_name": self.message.table_name,
624623
"filter": self.message.filter,

google/cloud/bigtable/row_set.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919

2020

2121
class RowSet(object):
22-
""" Convenience wrapper of google.bigtable.v2.RowSet
22+
"""Convenience wrapper of google.bigtable.v2.RowSet
2323
24-
Useful for creating a set of row keys and row ranges, which can
25-
be passed to yield_rows method of class:`.Table.yield_rows`.
24+
Useful for creating a set of row keys and row ranges, which can
25+
be passed to yield_rows method of class:`.Table.yield_rows`.
2626
"""
2727

2828
def __init__(self):
@@ -145,7 +145,7 @@ def _update_message_request(self, message):
145145

146146

147147
class RowRange(object):
148-
""" Convenience wrapper of google.bigtable.v2.RowRange
148+
"""Convenience wrapper of google.bigtable.v2.RowRange
149149
150150
:type start_key: bytes
151151
:param start_key: (Optional) Start key of the row range. If left empty,
@@ -195,7 +195,7 @@ def __ne__(self, other):
195195
return not self == other
196196

197197
def get_range_kwargs(self):
198-
""" Convert row range object to dict which can be passed to
198+
"""Convert row range object to dict which can be passed to
199199
google.bigtable.v2.RowRange add method.
200200
"""
201201
range_kwargs = {}

google/cloud/bigtable_admin_v2/gapic/bigtable_instance_admin_client.py

Lines changed: 41 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ def location_path(cls, project, location):
130130
def project_path(cls, project):
131131
"""Return a fully-qualified project string."""
132132
return google.api_core.path_template.expand(
133-
"projects/{project}", project=project,
133+
"projects/{project}",
134+
project=project,
134135
)
135136

136137
def __init__(
@@ -220,7 +221,9 @@ def __init__(
220221
self.transport = transport
221222
else:
222223
self.transport = bigtable_instance_admin_grpc_transport.BigtableInstanceAdminGrpcTransport(
223-
address=api_endpoint, channel=channel, credentials=credentials,
224+
address=api_endpoint,
225+
channel=channel,
226+
credentials=credentials,
224227
)
225228

226229
if client_info is None:
@@ -416,7 +419,9 @@ def get_instance(
416419
client_info=self._client_info,
417420
)
418421

419-
request = bigtable_instance_admin_pb2.GetInstanceRequest(name=name,)
422+
request = bigtable_instance_admin_pb2.GetInstanceRequest(
423+
name=name,
424+
)
420425
if metadata is None:
421426
metadata = []
422427
metadata = list(metadata)
@@ -489,7 +494,8 @@ def list_instances(
489494
)
490495

491496
request = bigtable_instance_admin_pb2.ListInstancesRequest(
492-
parent=parent, page_token=page_token,
497+
parent=parent,
498+
page_token=page_token,
493499
)
494500
if metadata is None:
495501
metadata = []
@@ -683,7 +689,8 @@ def partial_update_instance(
683689
)
684690

685691
request = bigtable_instance_admin_pb2.PartialUpdateInstanceRequest(
686-
instance=instance, update_mask=update_mask,
692+
instance=instance,
693+
update_mask=update_mask,
687694
)
688695
if metadata is None:
689696
metadata = []
@@ -757,7 +764,9 @@ def delete_instance(
757764
client_info=self._client_info,
758765
)
759766

760-
request = bigtable_instance_admin_pb2.DeleteInstanceRequest(name=name,)
767+
request = bigtable_instance_admin_pb2.DeleteInstanceRequest(
768+
name=name,
769+
)
761770
if metadata is None:
762771
metadata = []
763772
metadata = list(metadata)
@@ -854,7 +863,9 @@ def create_cluster(
854863
)
855864

856865
request = bigtable_instance_admin_pb2.CreateClusterRequest(
857-
parent=parent, cluster_id=cluster_id, cluster=cluster,
866+
parent=parent,
867+
cluster_id=cluster_id,
868+
cluster=cluster,
858869
)
859870
if metadata is None:
860871
metadata = []
@@ -931,7 +942,9 @@ def get_cluster(
931942
client_info=self._client_info,
932943
)
933944

934-
request = bigtable_instance_admin_pb2.GetClusterRequest(name=name,)
945+
request = bigtable_instance_admin_pb2.GetClusterRequest(
946+
name=name,
947+
)
935948
if metadata is None:
936949
metadata = []
937950
metadata = list(metadata)
@@ -1007,7 +1020,8 @@ def list_clusters(
10071020
)
10081021

10091022
request = bigtable_instance_admin_pb2.ListClustersRequest(
1010-
parent=parent, page_token=page_token,
1023+
parent=parent,
1024+
page_token=page_token,
10111025
)
10121026
if metadata is None:
10131027
metadata = []
@@ -1181,7 +1195,9 @@ def delete_cluster(
11811195
client_info=self._client_info,
11821196
)
11831197

1184-
request = bigtable_instance_admin_pb2.DeleteClusterRequest(name=name,)
1198+
request = bigtable_instance_admin_pb2.DeleteClusterRequest(
1199+
name=name,
1200+
)
11851201
if metadata is None:
11861202
metadata = []
11871203
metadata = list(metadata)
@@ -1346,7 +1362,9 @@ def get_app_profile(
13461362
client_info=self._client_info,
13471363
)
13481364

1349-
request = bigtable_instance_admin_pb2.GetAppProfileRequest(name=name,)
1365+
request = bigtable_instance_admin_pb2.GetAppProfileRequest(
1366+
name=name,
1367+
)
13501368
if metadata is None:
13511369
metadata = []
13521370
metadata = list(metadata)
@@ -1441,7 +1459,8 @@ def list_app_profiles(
14411459
)
14421460

14431461
request = bigtable_instance_admin_pb2.ListAppProfilesRequest(
1444-
parent=parent, page_size=page_size,
1462+
parent=parent,
1463+
page_size=page_size,
14451464
)
14461465
if metadata is None:
14471466
metadata = []
@@ -1627,7 +1646,8 @@ def delete_app_profile(
16271646
)
16281647

16291648
request = bigtable_instance_admin_pb2.DeleteAppProfileRequest(
1630-
name=name, ignore_warnings=ignore_warnings,
1649+
name=name,
1650+
ignore_warnings=ignore_warnings,
16311651
)
16321652
if metadata is None:
16331653
metadata = []
@@ -1707,7 +1727,8 @@ def get_iam_policy(
17071727
)
17081728

17091729
request = iam_policy_pb2.GetIamPolicyRequest(
1710-
resource=resource, options=options_,
1730+
resource=resource,
1731+
options=options_,
17111732
)
17121733
if metadata is None:
17131734
metadata = []
@@ -1791,7 +1812,10 @@ def set_iam_policy(
17911812
client_info=self._client_info,
17921813
)
17931814

1794-
request = iam_policy_pb2.SetIamPolicyRequest(resource=resource, policy=policy,)
1815+
request = iam_policy_pb2.SetIamPolicyRequest(
1816+
resource=resource,
1817+
policy=policy,
1818+
)
17951819
if metadata is None:
17961820
metadata = []
17971821
metadata = list(metadata)
@@ -1871,7 +1895,8 @@ def test_iam_permissions(
18711895
)
18721896

18731897
request = iam_policy_pb2.TestIamPermissionsRequest(
1874-
resource=resource, permissions=permissions,
1898+
resource=resource,
1899+
permissions=permissions,
18751900
)
18761901
if metadata is None:
18771902
metadata = []

0 commit comments

Comments
 (0)