Skip to content

Commit 22c8156

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

File tree

14 files changed

+911
-267
lines changed

14 files changed

+911
-267
lines changed

packages/google-cloud-bigquery-migration/.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-bigquery-migration/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-migration/google/cloud/bigquery_migration_v2alpha/services/migration_service/async_client.py

Lines changed: 46 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,12 @@ def sample_create_migration_workflow():
312312
)
313313

314314
# Send the request.
315-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
315+
response = await rpc(
316+
request,
317+
retry=retry,
318+
timeout=timeout,
319+
metadata=metadata,
320+
)
316321

317322
# Done; return the response.
318323
return response
@@ -413,7 +418,12 @@ def sample_get_migration_workflow():
413418
)
414419

415420
# Send the request.
416-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
421+
response = await rpc(
422+
request,
423+
retry=retry,
424+
timeout=timeout,
425+
metadata=metadata,
426+
)
417427

418428
# Done; return the response.
419429
return response
@@ -516,12 +526,20 @@ def sample_list_migration_workflows():
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.ListMigrationWorkflowsAsyncPager(
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.
@@ -605,7 +623,10 @@ def sample_delete_migration_workflow():
605623

606624
# Send the request.
607625
await rpc(
608-
request, retry=retry, timeout=timeout, metadata=metadata,
626+
request,
627+
retry=retry,
628+
timeout=timeout,
629+
metadata=metadata,
609630
)
610631

611632
async def start_migration_workflow(
@@ -700,7 +721,10 @@ def sample_start_migration_workflow():
700721

701722
# Send the request.
702723
await rpc(
703-
request, retry=retry, timeout=timeout, metadata=metadata,
724+
request,
725+
retry=retry,
726+
timeout=timeout,
727+
metadata=metadata,
704728
)
705729

706730
async def get_migration_subtask(
@@ -802,7 +826,12 @@ def sample_get_migration_subtask():
802826
)
803827

804828
# Send the request.
805-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
829+
response = await rpc(
830+
request,
831+
retry=retry,
832+
timeout=timeout,
833+
metadata=metadata,
834+
)
806835

807836
# Done; return the response.
808837
return response
@@ -904,12 +933,20 @@ def sample_list_migration_subtasks():
904933
)
905934

906935
# Send the request.
907-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
936+
response = await rpc(
937+
request,
938+
retry=retry,
939+
timeout=timeout,
940+
metadata=metadata,
941+
)
908942

909943
# This method is paged; wrap the response in a pager, which provides
910944
# an `__aiter__` convenience method.
911945
response = pagers.ListMigrationSubtasksAsyncPager(
912-
method=rpc, request=request, response=response, metadata=metadata,
946+
method=rpc,
947+
request=request,
948+
response=response,
949+
metadata=metadata,
913950
)
914951

915952
# Done; return the response.

packages/google-cloud-bigquery-migration/google/cloud/bigquery_migration_v2alpha/services/migration_service/client.py

Lines changed: 93 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ class MigrationServiceClientMeta(type):
6060
_transport_registry["grpc"] = MigrationServiceGrpcTransport
6161
_transport_registry["grpc_asyncio"] = MigrationServiceGrpcAsyncIOTransport
6262

63-
def get_transport_class(cls, label: str = None,) -> Type[MigrationServiceTransport]:
63+
def get_transport_class(
64+
cls,
65+
label: str = None,
66+
) -> Type[MigrationServiceTransport]:
6467
"""Returns an appropriate transport class.
6568
6669
Args:
@@ -166,11 +169,17 @@ def transport(self) -> MigrationServiceTransport:
166169

167170
@staticmethod
168171
def migration_subtask_path(
169-
project: str, location: str, workflow: str, subtask: str,
172+
project: str,
173+
location: str,
174+
workflow: str,
175+
subtask: str,
170176
) -> str:
171177
"""Returns a fully-qualified migration_subtask string."""
172178
return "projects/{project}/locations/{location}/workflows/{workflow}/subtasks/{subtask}".format(
173-
project=project, location=location, workflow=workflow, subtask=subtask,
179+
project=project,
180+
location=location,
181+
workflow=workflow,
182+
subtask=subtask,
174183
)
175184

176185
@staticmethod
@@ -183,10 +192,16 @@ def parse_migration_subtask_path(path: str) -> Dict[str, str]:
183192
return m.groupdict() if m else {}
184193

185194
@staticmethod
186-
def migration_workflow_path(project: str, location: str, workflow: str,) -> str:
195+
def migration_workflow_path(
196+
project: str,
197+
location: str,
198+
workflow: str,
199+
) -> str:
187200
"""Returns a fully-qualified migration_workflow string."""
188201
return "projects/{project}/locations/{location}/workflows/{workflow}".format(
189-
project=project, location=location, workflow=workflow,
202+
project=project,
203+
location=location,
204+
workflow=workflow,
190205
)
191206

192207
@staticmethod
@@ -199,7 +214,9 @@ def parse_migration_workflow_path(path: str) -> Dict[str, str]:
199214
return m.groupdict() if m else {}
200215

201216
@staticmethod
202-
def common_billing_account_path(billing_account: str,) -> str:
217+
def common_billing_account_path(
218+
billing_account: str,
219+
) -> str:
203220
"""Returns a fully-qualified billing_account string."""
204221
return "billingAccounts/{billing_account}".format(
205222
billing_account=billing_account,
@@ -212,9 +229,13 @@ def parse_common_billing_account_path(path: str) -> Dict[str, str]:
212229
return m.groupdict() if m else {}
213230

214231
@staticmethod
215-
def common_folder_path(folder: str,) -> str:
232+
def common_folder_path(
233+
folder: str,
234+
) -> str:
216235
"""Returns a fully-qualified folder string."""
217-
return "folders/{folder}".format(folder=folder,)
236+
return "folders/{folder}".format(
237+
folder=folder,
238+
)
218239

219240
@staticmethod
220241
def parse_common_folder_path(path: str) -> Dict[str, str]:
@@ -223,9 +244,13 @@ def parse_common_folder_path(path: str) -> Dict[str, str]:
223244
return m.groupdict() if m else {}
224245

225246
@staticmethod
226-
def common_organization_path(organization: str,) -> str:
247+
def common_organization_path(
248+
organization: str,
249+
) -> str:
227250
"""Returns a fully-qualified organization string."""
228-
return "organizations/{organization}".format(organization=organization,)
251+
return "organizations/{organization}".format(
252+
organization=organization,
253+
)
229254

230255
@staticmethod
231256
def parse_common_organization_path(path: str) -> Dict[str, str]:
@@ -234,9 +259,13 @@ def parse_common_organization_path(path: str) -> Dict[str, str]:
234259
return m.groupdict() if m else {}
235260

236261
@staticmethod
237-
def common_project_path(project: str,) -> str:
262+
def common_project_path(
263+
project: str,
264+
) -> str:
238265
"""Returns a fully-qualified project string."""
239-
return "projects/{project}".format(project=project,)
266+
return "projects/{project}".format(
267+
project=project,
268+
)
240269

241270
@staticmethod
242271
def parse_common_project_path(path: str) -> Dict[str, str]:
@@ -245,10 +274,14 @@ def parse_common_project_path(path: str) -> Dict[str, str]:
245274
return m.groupdict() if m else {}
246275

247276
@staticmethod
248-
def common_location_path(project: str, location: str,) -> str:
277+
def common_location_path(
278+
project: str,
279+
location: str,
280+
) -> str:
249281
"""Returns a fully-qualified location string."""
250282
return "projects/{project}/locations/{location}".format(
251-
project=project, location=location,
283+
project=project,
284+
location=location,
252285
)
253286

254287
@staticmethod
@@ -521,7 +554,12 @@ def sample_create_migration_workflow():
521554
)
522555

523556
# Send the request.
524-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
557+
response = rpc(
558+
request,
559+
retry=retry,
560+
timeout=timeout,
561+
metadata=metadata,
562+
)
525563

526564
# Done; return the response.
527565
return response
@@ -613,7 +651,12 @@ def sample_get_migration_workflow():
613651
)
614652

615653
# Send the request.
616-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
654+
response = rpc(
655+
request,
656+
retry=retry,
657+
timeout=timeout,
658+
metadata=metadata,
659+
)
617660

618661
# Done; return the response.
619662
return response
@@ -707,12 +750,20 @@ def sample_list_migration_workflows():
707750
)
708751

709752
# Send the request.
710-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
753+
response = rpc(
754+
request,
755+
retry=retry,
756+
timeout=timeout,
757+
metadata=metadata,
758+
)
711759

712760
# This method is paged; wrap the response in a pager, which provides
713761
# an `__iter__` convenience method.
714762
response = pagers.ListMigrationWorkflowsPager(
715-
method=rpc, request=request, response=response, metadata=metadata,
763+
method=rpc,
764+
request=request,
765+
response=response,
766+
metadata=metadata,
716767
)
717768

718769
# Done; return the response.
@@ -798,7 +849,10 @@ def sample_delete_migration_workflow():
798849

799850
# Send the request.
800851
rpc(
801-
request, retry=retry, timeout=timeout, metadata=metadata,
852+
request,
853+
retry=retry,
854+
timeout=timeout,
855+
metadata=metadata,
802856
)
803857

804858
def start_migration_workflow(
@@ -884,7 +938,10 @@ def sample_start_migration_workflow():
884938

885939
# Send the request.
886940
rpc(
887-
request, retry=retry, timeout=timeout, metadata=metadata,
941+
request,
942+
retry=retry,
943+
timeout=timeout,
944+
metadata=metadata,
888945
)
889946

890947
def get_migration_subtask(
@@ -977,7 +1034,12 @@ def sample_get_migration_subtask():
9771034
)
9781035

9791036
# Send the request.
980-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
1037+
response = rpc(
1038+
request,
1039+
retry=retry,
1040+
timeout=timeout,
1041+
metadata=metadata,
1042+
)
9811043

9821044
# Done; return the response.
9831045
return response
@@ -1070,12 +1132,20 @@ def sample_list_migration_subtasks():
10701132
)
10711133

10721134
# Send the request.
1073-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
1135+
response = rpc(
1136+
request,
1137+
retry=retry,
1138+
timeout=timeout,
1139+
metadata=metadata,
1140+
)
10741141

10751142
# This method is paged; wrap the response in a pager, which provides
10761143
# an `__iter__` convenience method.
10771144
response = pagers.ListMigrationSubtasksPager(
1078-
method=rpc, request=request, response=response, metadata=metadata,
1145+
method=rpc,
1146+
request=request,
1147+
response=response,
1148+
metadata=metadata,
10791149
)
10801150

10811151
# Done; return the response.

packages/google-cloud-bigquery-migration/google/cloud/bigquery_migration_v2alpha/services/migration_service/transports/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,9 @@ def _prep_wrapped_messages(self, client_info):
207207
def close(self):
208208
"""Closes resources associated with the transport.
209209
210-
.. warning::
211-
Only call this method if the transport is NOT shared
212-
with other clients - this may cause errors in other clients!
210+
.. warning::
211+
Only call this method if the transport is NOT shared
212+
with other clients - this may cause errors in other clients!
213213
"""
214214
raise NotImplementedError()
215215

packages/google-cloud-bigquery-migration/google/cloud/bigquery_migration_v2alpha/services/migration_service/transports/grpc.py

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

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

233232
@property

0 commit comments

Comments
 (0)