Skip to content

Commit

Permalink
chore(python): use black==22.3.0 (#51)
Browse files Browse the repository at this point in the history
Source-Link: googleapis/synthtool@6fab84a
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:7cffbc10910c3ab1b852c05114a08d374c195a81cdec1d4a67a1d129331d0bfe
  • Loading branch information
gcf-owl-bot[bot] authored Mar 29, 2022
1 parent 9d31540 commit 22c8156
Show file tree
Hide file tree
Showing 14 changed files with 911 additions and 267 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
digest: sha256:4e1991042fe54b991db9ca17c8fb386e61b22fe4d1472a568bf0fcac85dcf5d3
digest: sha256:7cffbc10910c3ab1b852c05114a08d374c195a81cdec1d4a67a1d129331d0bfe
5 changes: 4 additions & 1 deletion packages/google-cloud-bigquery-migration/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,10 @@
intersphinx_mapping = {
"python": ("https://python.readthedocs.org/en/latest/", None),
"google-auth": ("https://googleapis.dev/python/google-auth/latest/", None),
"google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,),
"google.api_core": (
"https://googleapis.dev/python/google-api-core/latest/",
None,
),
"grpc": ("https://grpc.github.io/grpc/python/", None),
"proto-plus": ("https://proto-plus-python.readthedocs.io/en/latest/", None),
"protobuf": ("https://googleapis.dev/python/protobuf/latest/", None),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,12 @@ def sample_create_migration_workflow():
)

# Send the request.
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
response = await rpc(
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

# Done; return the response.
return response
Expand Down Expand Up @@ -413,7 +418,12 @@ def sample_get_migration_workflow():
)

# Send the request.
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
response = await rpc(
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

# Done; return the response.
return response
Expand Down Expand Up @@ -516,12 +526,20 @@ def sample_list_migration_workflows():
)

# Send the request.
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
response = await rpc(
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

# This method is paged; wrap the response in a pager, which provides
# an `__aiter__` convenience method.
response = pagers.ListMigrationWorkflowsAsyncPager(
method=rpc, request=request, response=response, metadata=metadata,
method=rpc,
request=request,
response=response,
metadata=metadata,
)

# Done; return the response.
Expand Down Expand Up @@ -605,7 +623,10 @@ def sample_delete_migration_workflow():

# Send the request.
await rpc(
request, retry=retry, timeout=timeout, metadata=metadata,
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

async def start_migration_workflow(
Expand Down Expand Up @@ -700,7 +721,10 @@ def sample_start_migration_workflow():

# Send the request.
await rpc(
request, retry=retry, timeout=timeout, metadata=metadata,
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

async def get_migration_subtask(
Expand Down Expand Up @@ -802,7 +826,12 @@ def sample_get_migration_subtask():
)

# Send the request.
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
response = await rpc(
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

# Done; return the response.
return response
Expand Down Expand Up @@ -904,12 +933,20 @@ def sample_list_migration_subtasks():
)

# Send the request.
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
response = await rpc(
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

# This method is paged; wrap the response in a pager, which provides
# an `__aiter__` convenience method.
response = pagers.ListMigrationSubtasksAsyncPager(
method=rpc, request=request, response=response, metadata=metadata,
method=rpc,
request=request,
response=response,
metadata=metadata,
)

# Done; return the response.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ class MigrationServiceClientMeta(type):
_transport_registry["grpc"] = MigrationServiceGrpcTransport
_transport_registry["grpc_asyncio"] = MigrationServiceGrpcAsyncIOTransport

def get_transport_class(cls, label: str = None,) -> Type[MigrationServiceTransport]:
def get_transport_class(
cls,
label: str = None,
) -> Type[MigrationServiceTransport]:
"""Returns an appropriate transport class.
Args:
Expand Down Expand Up @@ -166,11 +169,17 @@ def transport(self) -> MigrationServiceTransport:

@staticmethod
def migration_subtask_path(
project: str, location: str, workflow: str, subtask: str,
project: str,
location: str,
workflow: str,
subtask: str,
) -> str:
"""Returns a fully-qualified migration_subtask string."""
return "projects/{project}/locations/{location}/workflows/{workflow}/subtasks/{subtask}".format(
project=project, location=location, workflow=workflow, subtask=subtask,
project=project,
location=location,
workflow=workflow,
subtask=subtask,
)

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

@staticmethod
def migration_workflow_path(project: str, location: str, workflow: str,) -> str:
def migration_workflow_path(
project: str,
location: str,
workflow: str,
) -> str:
"""Returns a fully-qualified migration_workflow string."""
return "projects/{project}/locations/{location}/workflows/{workflow}".format(
project=project, location=location, workflow=workflow,
project=project,
location=location,
workflow=workflow,
)

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

@staticmethod
def common_billing_account_path(billing_account: str,) -> str:
def common_billing_account_path(
billing_account: str,
) -> str:
"""Returns a fully-qualified billing_account string."""
return "billingAccounts/{billing_account}".format(
billing_account=billing_account,
Expand All @@ -212,9 +229,13 @@ def parse_common_billing_account_path(path: str) -> Dict[str, str]:
return m.groupdict() if m else {}

@staticmethod
def common_folder_path(folder: str,) -> str:
def common_folder_path(
folder: str,
) -> str:
"""Returns a fully-qualified folder string."""
return "folders/{folder}".format(folder=folder,)
return "folders/{folder}".format(
folder=folder,
)

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

@staticmethod
def common_organization_path(organization: str,) -> str:
def common_organization_path(
organization: str,
) -> str:
"""Returns a fully-qualified organization string."""
return "organizations/{organization}".format(organization=organization,)
return "organizations/{organization}".format(
organization=organization,
)

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

@staticmethod
def common_project_path(project: str,) -> str:
def common_project_path(
project: str,
) -> str:
"""Returns a fully-qualified project string."""
return "projects/{project}".format(project=project,)
return "projects/{project}".format(
project=project,
)

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

@staticmethod
def common_location_path(project: str, location: str,) -> str:
def common_location_path(
project: str,
location: str,
) -> str:
"""Returns a fully-qualified location string."""
return "projects/{project}/locations/{location}".format(
project=project, location=location,
project=project,
location=location,
)

@staticmethod
Expand Down Expand Up @@ -521,7 +554,12 @@ def sample_create_migration_workflow():
)

# Send the request.
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
response = rpc(
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

# Done; return the response.
return response
Expand Down Expand Up @@ -613,7 +651,12 @@ def sample_get_migration_workflow():
)

# Send the request.
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
response = rpc(
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

# Done; return the response.
return response
Expand Down Expand Up @@ -707,12 +750,20 @@ def sample_list_migration_workflows():
)

# Send the request.
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
response = rpc(
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

# This method is paged; wrap the response in a pager, which provides
# an `__iter__` convenience method.
response = pagers.ListMigrationWorkflowsPager(
method=rpc, request=request, response=response, metadata=metadata,
method=rpc,
request=request,
response=response,
metadata=metadata,
)

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

# Send the request.
rpc(
request, retry=retry, timeout=timeout, metadata=metadata,
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

def start_migration_workflow(
Expand Down Expand Up @@ -884,7 +938,10 @@ def sample_start_migration_workflow():

# Send the request.
rpc(
request, retry=retry, timeout=timeout, metadata=metadata,
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

def get_migration_subtask(
Expand Down Expand Up @@ -977,7 +1034,12 @@ def sample_get_migration_subtask():
)

# Send the request.
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
response = rpc(
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

# Done; return the response.
return response
Expand Down Expand Up @@ -1070,12 +1132,20 @@ def sample_list_migration_subtasks():
)

# Send the request.
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
response = rpc(
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

# This method is paged; wrap the response in a pager, which provides
# an `__iter__` convenience method.
response = pagers.ListMigrationSubtasksPager(
method=rpc, request=request, response=response, metadata=metadata,
method=rpc,
request=request,
response=response,
metadata=metadata,
)

# Done; return the response.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,9 @@ def _prep_wrapped_messages(self, client_info):
def close(self):
"""Closes resources associated with the transport.
.. warning::
Only call this method if the transport is NOT shared
with other clients - this may cause errors in other clients!
.. warning::
Only call this method if the transport is NOT shared
with other clients - this may cause errors in other clients!
"""
raise NotImplementedError()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,7 @@ def create_channel(

@property
def grpc_channel(self) -> grpc.Channel:
"""Return the channel designed to connect to this service.
"""
"""Return the channel designed to connect to this service."""
return self._grpc_channel

@property
Expand Down
Loading

0 comments on commit 22c8156

Please sign in to comment.