Skip to content

Commit af644b7

Browse files
chore(python): use black==22.3.0 (#189)
Source-Link: googleapis/synthtool@6fab84a Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:7cffbc10910c3ab1b852c05114a08d374c195a81cdec1d4a67a1d129331d0bfe
1 parent 00d5671 commit af644b7

10 files changed

Lines changed: 761 additions & 225 deletions

File tree

packages/google-cloud-bigquery-connection/.github/.OwlBot.lock.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# limitations under the License.
1414
docker:
1515
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
16-
digest: sha256:2d13c2172a5d6129c861edaa48b60ead15aeaf58aa75e02d870c4cbdfa63aaba
16+
digest: sha256:7cffbc10910c3ab1b852c05114a08d374c195a81cdec1d4a67a1d129331d0bfe

packages/google-cloud-bigquery-connection/docs/conf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,10 @@
361361
intersphinx_mapping = {
362362
"python": ("https://python.readthedocs.org/en/latest/", None),
363363
"google-auth": ("https://googleapis.dev/python/google-auth/latest/", None),
364-
"google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,),
364+
"google.api_core": (
365+
"https://googleapis.dev/python/google-api-core/latest/",
366+
None,
367+
),
365368
"grpc": ("https://grpc.github.io/grpc/python/", None),
366369
"proto-plus": ("https://proto-plus-python.readthedocs.io/en/latest/", None),
367370
"protobuf": ("https://googleapis.dev/python/protobuf/latest/", None),

packages/google-cloud-bigquery-connection/google/cloud/bigquery_connection_v1/services/connection_service/async_client.py

Lines changed: 58 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,12 @@ def sample_create_connection():
310310
)
311311

312312
# Send the request.
313-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
313+
response = await rpc(
314+
request,
315+
retry=retry,
316+
timeout=timeout,
317+
metadata=metadata,
318+
)
314319

315320
# Done; return the response.
316321
return response
@@ -411,7 +416,12 @@ def sample_get_connection():
411416
)
412417

413418
# Send the request.
414-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
419+
response = await rpc(
420+
request,
421+
retry=retry,
422+
timeout=timeout,
423+
metadata=metadata,
424+
)
415425

416426
# Done; return the response.
417427
return response
@@ -516,12 +526,20 @@ def sample_list_connections():
516526
)
517527

518528
# Send the request.
519-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
529+
response = await rpc(
530+
request,
531+
retry=retry,
532+
timeout=timeout,
533+
metadata=metadata,
534+
)
520535

521536
# This method is paged; wrap the response in a pager, which provides
522537
# an `__aiter__` convenience method.
523538
response = pagers.ListConnectionsAsyncPager(
524-
method=rpc, request=request, response=response, metadata=metadata,
539+
method=rpc,
540+
request=request,
541+
response=response,
542+
metadata=metadata,
525543
)
526544

527545
# Done; return the response.
@@ -636,7 +654,12 @@ def sample_update_connection():
636654
)
637655

638656
# Send the request.
639-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
657+
response = await rpc(
658+
request,
659+
retry=retry,
660+
timeout=timeout,
661+
metadata=metadata,
662+
)
640663

641664
# Done; return the response.
642665
return response
@@ -728,7 +751,10 @@ def sample_delete_connection():
728751

729752
# Send the request.
730753
await rpc(
731-
request, retry=retry, timeout=timeout, metadata=metadata,
754+
request,
755+
retry=retry,
756+
timeout=timeout,
757+
metadata=metadata,
732758
)
733759

734760
async def get_iam_policy(
@@ -857,7 +883,9 @@ def sample_get_iam_policy():
857883
if isinstance(request, dict):
858884
request = iam_policy_pb2.GetIamPolicyRequest(**request)
859885
elif not request:
860-
request = iam_policy_pb2.GetIamPolicyRequest(resource=resource,)
886+
request = iam_policy_pb2.GetIamPolicyRequest(
887+
resource=resource,
888+
)
861889

862890
# Wrap the RPC method; this adds retry and timeout information,
863891
# and friendly error handling.
@@ -874,7 +902,12 @@ def sample_get_iam_policy():
874902
)
875903

876904
# Send the request.
877-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
905+
response = await rpc(
906+
request,
907+
retry=retry,
908+
timeout=timeout,
909+
metadata=metadata,
910+
)
878911

879912
# Done; return the response.
880913
return response
@@ -1007,7 +1040,9 @@ def sample_set_iam_policy():
10071040
if isinstance(request, dict):
10081041
request = iam_policy_pb2.SetIamPolicyRequest(**request)
10091042
elif not request:
1010-
request = iam_policy_pb2.SetIamPolicyRequest(resource=resource,)
1043+
request = iam_policy_pb2.SetIamPolicyRequest(
1044+
resource=resource,
1045+
)
10111046

10121047
# Wrap the RPC method; this adds retry and timeout information,
10131048
# and friendly error handling.
@@ -1024,7 +1059,12 @@ def sample_set_iam_policy():
10241059
)
10251060

10261061
# Send the request.
1027-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
1062+
response = await rpc(
1063+
request,
1064+
retry=retry,
1065+
timeout=timeout,
1066+
metadata=metadata,
1067+
)
10281068

10291069
# Done; return the response.
10301070
return response
@@ -1117,7 +1157,8 @@ def sample_test_iam_permissions():
11171157
request = iam_policy_pb2.TestIamPermissionsRequest(**request)
11181158
elif not request:
11191159
request = iam_policy_pb2.TestIamPermissionsRequest(
1120-
resource=resource, permissions=permissions,
1160+
resource=resource,
1161+
permissions=permissions,
11211162
)
11221163

11231164
# Wrap the RPC method; this adds retry and timeout information,
@@ -1135,7 +1176,12 @@ def sample_test_iam_permissions():
11351176
)
11361177

11371178
# Send the request.
1138-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
1179+
response = await rpc(
1180+
request,
1181+
retry=retry,
1182+
timeout=timeout,
1183+
metadata=metadata,
1184+
)
11391185

11401186
# Done; return the response.
11411187
return response

packages/google-cloud-bigquery-connection/google/cloud/bigquery_connection_v1/services/connection_service/client.py

Lines changed: 90 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ class ConnectionServiceClientMeta(type):
6060
_transport_registry["grpc_asyncio"] = ConnectionServiceGrpcAsyncIOTransport
6161

6262
def get_transport_class(
63-
cls, label: str = None,
63+
cls,
64+
label: str = None,
6465
) -> Type[ConnectionServiceTransport]:
6566
"""Returns an appropriate transport class.
6667
@@ -166,10 +167,18 @@ def transport(self) -> ConnectionServiceTransport:
166167
return self._transport
167168

168169
@staticmethod
169-
def connection_path(project: str, location: str, connection: str,) -> str:
170+
def connection_path(
171+
project: str,
172+
location: str,
173+
connection: str,
174+
) -> str:
170175
"""Returns a fully-qualified connection string."""
171-
return "projects/{project}/locations/{location}/connections/{connection}".format(
172-
project=project, location=location, connection=connection,
176+
return (
177+
"projects/{project}/locations/{location}/connections/{connection}".format(
178+
project=project,
179+
location=location,
180+
connection=connection,
181+
)
173182
)
174183

175184
@staticmethod
@@ -182,7 +191,9 @@ def parse_connection_path(path: str) -> Dict[str, str]:
182191
return m.groupdict() if m else {}
183192

184193
@staticmethod
185-
def common_billing_account_path(billing_account: str,) -> str:
194+
def common_billing_account_path(
195+
billing_account: str,
196+
) -> str:
186197
"""Returns a fully-qualified billing_account string."""
187198
return "billingAccounts/{billing_account}".format(
188199
billing_account=billing_account,
@@ -195,9 +206,13 @@ def parse_common_billing_account_path(path: str) -> Dict[str, str]:
195206
return m.groupdict() if m else {}
196207

197208
@staticmethod
198-
def common_folder_path(folder: str,) -> str:
209+
def common_folder_path(
210+
folder: str,
211+
) -> str:
199212
"""Returns a fully-qualified folder string."""
200-
return "folders/{folder}".format(folder=folder,)
213+
return "folders/{folder}".format(
214+
folder=folder,
215+
)
201216

202217
@staticmethod
203218
def parse_common_folder_path(path: str) -> Dict[str, str]:
@@ -206,9 +221,13 @@ def parse_common_folder_path(path: str) -> Dict[str, str]:
206221
return m.groupdict() if m else {}
207222

208223
@staticmethod
209-
def common_organization_path(organization: str,) -> str:
224+
def common_organization_path(
225+
organization: str,
226+
) -> str:
210227
"""Returns a fully-qualified organization string."""
211-
return "organizations/{organization}".format(organization=organization,)
228+
return "organizations/{organization}".format(
229+
organization=organization,
230+
)
212231

213232
@staticmethod
214233
def parse_common_organization_path(path: str) -> Dict[str, str]:
@@ -217,9 +236,13 @@ def parse_common_organization_path(path: str) -> Dict[str, str]:
217236
return m.groupdict() if m else {}
218237

219238
@staticmethod
220-
def common_project_path(project: str,) -> str:
239+
def common_project_path(
240+
project: str,
241+
) -> str:
221242
"""Returns a fully-qualified project string."""
222-
return "projects/{project}".format(project=project,)
243+
return "projects/{project}".format(
244+
project=project,
245+
)
223246

224247
@staticmethod
225248
def parse_common_project_path(path: str) -> Dict[str, str]:
@@ -228,10 +251,14 @@ def parse_common_project_path(path: str) -> Dict[str, str]:
228251
return m.groupdict() if m else {}
229252

230253
@staticmethod
231-
def common_location_path(project: str, location: str,) -> str:
254+
def common_location_path(
255+
project: str,
256+
location: str,
257+
) -> str:
232258
"""Returns a fully-qualified location string."""
233259
return "projects/{project}/locations/{location}".format(
234-
project=project, location=location,
260+
project=project,
261+
location=location,
235262
)
236263

237264
@staticmethod
@@ -509,7 +536,12 @@ def sample_create_connection():
509536
)
510537

511538
# Send the request.
512-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
539+
response = rpc(
540+
request,
541+
retry=retry,
542+
timeout=timeout,
543+
metadata=metadata,
544+
)
513545

514546
# Done; return the response.
515547
return response
@@ -600,7 +632,12 @@ def sample_get_connection():
600632
)
601633

602634
# Send the request.
603-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
635+
response = rpc(
636+
request,
637+
retry=retry,
638+
timeout=timeout,
639+
metadata=metadata,
640+
)
604641

605642
# Done; return the response.
606643
return response
@@ -695,12 +732,20 @@ def sample_list_connections():
695732
)
696733

697734
# Send the request.
698-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
735+
response = rpc(
736+
request,
737+
retry=retry,
738+
timeout=timeout,
739+
metadata=metadata,
740+
)
699741

700742
# This method is paged; wrap the response in a pager, which provides
701743
# an `__iter__` convenience method.
702744
response = pagers.ListConnectionsPager(
703-
method=rpc, request=request, response=response, metadata=metadata,
745+
method=rpc,
746+
request=request,
747+
response=response,
748+
metadata=metadata,
704749
)
705750

706751
# Done; return the response.
@@ -815,7 +860,12 @@ def sample_update_connection():
815860
)
816861

817862
# Send the request.
818-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
863+
response = rpc(
864+
request,
865+
retry=retry,
866+
timeout=timeout,
867+
metadata=metadata,
868+
)
819869

820870
# Done; return the response.
821871
return response
@@ -897,7 +947,10 @@ def sample_delete_connection():
897947

898948
# Send the request.
899949
rpc(
900-
request, retry=retry, timeout=timeout, metadata=metadata,
950+
request,
951+
retry=retry,
952+
timeout=timeout,
953+
metadata=metadata,
901954
)
902955

903956
def get_iam_policy(
@@ -1042,7 +1095,12 @@ def sample_get_iam_policy():
10421095
)
10431096

10441097
# Send the request.
1045-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
1098+
response = rpc(
1099+
request,
1100+
retry=retry,
1101+
timeout=timeout,
1102+
metadata=metadata,
1103+
)
10461104

10471105
# Done; return the response.
10481106
return response
@@ -1191,7 +1249,12 @@ def sample_set_iam_policy():
11911249
)
11921250

11931251
# Send the request.
1194-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
1252+
response = rpc(
1253+
request,
1254+
retry=retry,
1255+
timeout=timeout,
1256+
metadata=metadata,
1257+
)
11951258

11961259
# Done; return the response.
11971260
return response
@@ -1301,7 +1364,12 @@ def sample_test_iam_permissions():
13011364
)
13021365

13031366
# Send the request.
1304-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
1367+
response = rpc(
1368+
request,
1369+
retry=retry,
1370+
timeout=timeout,
1371+
metadata=metadata,
1372+
)
13051373

13061374
# Done; return the response.
13071375
return response

0 commit comments

Comments
 (0)