Skip to content

Commit 7078ad5

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

File tree

40 files changed

+3344
-892
lines changed

40 files changed

+3344
-892
lines changed

packages/google-cloud-dataflow-client/.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:4e1991042fe54b991db9ca17c8fb386e61b22fe4d1472a568bf0fcac85dcf5d3
16+
digest: sha256:7cffbc10910c3ab1b852c05114a08d374c195a81cdec1d4a67a1d129331d0bfe

packages/google-cloud-dataflow-client/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-dataflow-client/google/cloud/dataflow_v1beta3/services/flex_templates_service/async_client.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,12 @@ def sample_launch_flex_template():
259259
)
260260

261261
# Send the request.
262-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
262+
response = await rpc(
263+
request,
264+
retry=retry,
265+
timeout=timeout,
266+
metadata=metadata,
267+
)
263268

264269
# Done; return the response.
265270
return response

packages/google-cloud-dataflow-client/google/cloud/dataflow_v1beta3/services/flex_templates_service/client.py

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ class FlexTemplatesServiceClientMeta(type):
5656
_transport_registry["grpc_asyncio"] = FlexTemplatesServiceGrpcAsyncIOTransport
5757

5858
def get_transport_class(
59-
cls, label: str = None,
59+
cls,
60+
label: str = None,
6061
) -> Type[FlexTemplatesServiceTransport]:
6162
"""Returns an appropriate transport class.
6263
@@ -164,7 +165,9 @@ def transport(self) -> FlexTemplatesServiceTransport:
164165
return self._transport
165166

166167
@staticmethod
167-
def common_billing_account_path(billing_account: str,) -> str:
168+
def common_billing_account_path(
169+
billing_account: str,
170+
) -> str:
168171
"""Returns a fully-qualified billing_account string."""
169172
return "billingAccounts/{billing_account}".format(
170173
billing_account=billing_account,
@@ -177,9 +180,13 @@ def parse_common_billing_account_path(path: str) -> Dict[str, str]:
177180
return m.groupdict() if m else {}
178181

179182
@staticmethod
180-
def common_folder_path(folder: str,) -> str:
183+
def common_folder_path(
184+
folder: str,
185+
) -> str:
181186
"""Returns a fully-qualified folder string."""
182-
return "folders/{folder}".format(folder=folder,)
187+
return "folders/{folder}".format(
188+
folder=folder,
189+
)
183190

184191
@staticmethod
185192
def parse_common_folder_path(path: str) -> Dict[str, str]:
@@ -188,9 +195,13 @@ def parse_common_folder_path(path: str) -> Dict[str, str]:
188195
return m.groupdict() if m else {}
189196

190197
@staticmethod
191-
def common_organization_path(organization: str,) -> str:
198+
def common_organization_path(
199+
organization: str,
200+
) -> str:
192201
"""Returns a fully-qualified organization string."""
193-
return "organizations/{organization}".format(organization=organization,)
202+
return "organizations/{organization}".format(
203+
organization=organization,
204+
)
194205

195206
@staticmethod
196207
def parse_common_organization_path(path: str) -> Dict[str, str]:
@@ -199,9 +210,13 @@ def parse_common_organization_path(path: str) -> Dict[str, str]:
199210
return m.groupdict() if m else {}
200211

201212
@staticmethod
202-
def common_project_path(project: str,) -> str:
213+
def common_project_path(
214+
project: str,
215+
) -> str:
203216
"""Returns a fully-qualified project string."""
204-
return "projects/{project}".format(project=project,)
217+
return "projects/{project}".format(
218+
project=project,
219+
)
205220

206221
@staticmethod
207222
def parse_common_project_path(path: str) -> Dict[str, str]:
@@ -210,10 +225,14 @@ def parse_common_project_path(path: str) -> Dict[str, str]:
210225
return m.groupdict() if m else {}
211226

212227
@staticmethod
213-
def common_location_path(project: str, location: str,) -> str:
228+
def common_location_path(
229+
project: str,
230+
location: str,
231+
) -> str:
214232
"""Returns a fully-qualified location string."""
215233
return "projects/{project}/locations/{location}".format(
216-
project=project, location=location,
234+
project=project,
235+
location=location,
217236
)
218237

219238
@staticmethod
@@ -444,7 +463,12 @@ def sample_launch_flex_template():
444463
rpc = self._transport._wrapped_methods[self._transport.launch_flex_template]
445464

446465
# Send the request.
447-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
466+
response = rpc(
467+
request,
468+
retry=retry,
469+
timeout=timeout,
470+
metadata=metadata,
471+
)
448472

449473
# Done; return the response.
450474
return response

packages/google-cloud-dataflow-client/google/cloud/dataflow_v1beta3/services/flex_templates_service/transports/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,9 @@ def _prep_wrapped_messages(self, client_info):
135135
def close(self):
136136
"""Closes resources associated with the transport.
137137
138-
.. warning::
139-
Only call this method if the transport is NOT shared
140-
with other clients - this may cause errors in other clients!
138+
.. warning::
139+
Only call this method if the transport is NOT shared
140+
with other clients - this may cause errors in other clients!
141141
"""
142142
raise NotImplementedError()
143143

packages/google-cloud-dataflow-client/google/cloud/dataflow_v1beta3/services/flex_templates_service/transports/grpc.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,7 @@ def create_channel(
225225

226226
@property
227227
def grpc_channel(self) -> grpc.Channel:
228-
"""Return the channel designed to connect to this service.
229-
"""
228+
"""Return the channel designed to connect to this service."""
230229
return self._grpc_channel
231230

232231
@property

packages/google-cloud-dataflow-client/google/cloud/dataflow_v1beta3/services/jobs_v1_beta3/async_client.py

Lines changed: 50 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,12 @@ def sample_create_job():
266266
)
267267

268268
# Send the request.
269-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
269+
response = await rpc(
270+
request,
271+
retry=retry,
272+
timeout=timeout,
273+
metadata=metadata,
274+
)
270275

271276
# Done; return the response.
272277
return response
@@ -334,7 +339,12 @@ def sample_get_job():
334339
)
335340

336341
# Send the request.
337-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
342+
response = await rpc(
343+
request,
344+
retry=retry,
345+
timeout=timeout,
346+
metadata=metadata,
347+
)
338348

339349
# Done; return the response.
340350
return response
@@ -403,7 +413,12 @@ def sample_update_job():
403413
)
404414

405415
# Send the request.
406-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
416+
response = await rpc(
417+
request,
418+
retry=retry,
419+
timeout=timeout,
420+
metadata=metadata,
421+
)
407422

408423
# Done; return the response.
409424
return response
@@ -483,12 +498,20 @@ def sample_list_jobs():
483498
)
484499

485500
# Send the request.
486-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
501+
response = await rpc(
502+
request,
503+
retry=retry,
504+
timeout=timeout,
505+
metadata=metadata,
506+
)
487507

488508
# This method is paged; wrap the response in a pager, which provides
489509
# an `__aiter__` convenience method.
490510
response = pagers.ListJobsAsyncPager(
491-
method=rpc, request=request, response=response, metadata=metadata,
511+
method=rpc,
512+
request=request,
513+
response=response,
514+
metadata=metadata,
492515
)
493516

494517
# Done; return the response.
@@ -560,12 +583,20 @@ def sample_aggregated_list_jobs():
560583
)
561584

562585
# Send the request.
563-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
586+
response = await rpc(
587+
request,
588+
retry=retry,
589+
timeout=timeout,
590+
metadata=metadata,
591+
)
564592

565593
# This method is paged; wrap the response in a pager, which provides
566594
# an `__aiter__` convenience method.
567595
response = pagers.AggregatedListJobsAsyncPager(
568-
method=rpc, request=request, response=response, metadata=metadata,
596+
method=rpc,
597+
request=request,
598+
response=response,
599+
metadata=metadata,
569600
)
570601

571602
# Done; return the response.
@@ -627,7 +658,12 @@ def sample_check_active_jobs():
627658
)
628659

629660
# Send the request.
630-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
661+
response = await rpc(
662+
request,
663+
retry=retry,
664+
timeout=timeout,
665+
metadata=metadata,
666+
)
631667

632668
# Done; return the response.
633669
return response
@@ -686,7 +722,12 @@ def sample_snapshot_job():
686722
)
687723

688724
# Send the request.
689-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
725+
response = await rpc(
726+
request,
727+
retry=retry,
728+
timeout=timeout,
729+
metadata=metadata,
730+
)
690731

691732
# Done; return the response.
692733
return response

0 commit comments

Comments
 (0)