Skip to content

Commit

Permalink
chore(python): use black==22.3.0 (#256)
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 508bdff commit 949d051
Show file tree
Hide file tree
Showing 18 changed files with 2,869 additions and 802 deletions.
2 changes: 1 addition & 1 deletion packages/google-cloud-kms/.github/.OwlBot.lock.yaml
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
13 changes: 11 additions & 2 deletions packages/google-cloud-kms/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,13 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(root_doc, "google-cloud-kms", "google-cloud-kms Documentation", [author], 1,)
(
root_doc,
"google-cloud-kms",
"google-cloud-kms Documentation",
[author],
1,
)
]

# If true, show URL addresses after external links.
Expand Down Expand Up @@ -355,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 @@ -314,12 +314,20 @@ def sample_list_ekm_connections():
)

# 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.ListEkmConnectionsAsyncPager(
method=rpc, request=request, response=response, metadata=metadata,
method=rpc,
request=request,
response=response,
metadata=metadata,
)

# Done; return the response.
Expand Down Expand Up @@ -435,7 +443,12 @@ def sample_get_ekm_connection():
)

# 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 @@ -572,7 +585,12 @@ def sample_create_ekm_connection():
)

# 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 @@ -697,7 +715,12 @@ def sample_update_ekm_connection():
)

# 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 @@ -809,7 +832,12 @@ async def set_iam_policy(
)

# 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 @@ -922,7 +950,12 @@ async def get_iam_policy(
)

# 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 @@ -977,7 +1010,12 @@ async def test_iam_permissions(
)

# 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 All @@ -991,7 +1029,9 @@ async def __aexit__(self, exc_type, exc, tb):

try:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
gapic_version=pkg_resources.get_distribution("google-cloud-kms",).version,
gapic_version=pkg_resources.get_distribution(
"google-cloud-kms",
).version,
)
except pkg_resources.DistributionNotFound:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ class EkmServiceClientMeta(type):
_transport_registry["grpc"] = EkmServiceGrpcTransport
_transport_registry["grpc_asyncio"] = EkmServiceGrpcAsyncIOTransport

def get_transport_class(cls, label: str = None,) -> Type[EkmServiceTransport]:
def get_transport_class(
cls,
label: str = None,
) -> Type[EkmServiceTransport]:
"""Returns an appropriate transport class.
Expand Down Expand Up @@ -172,10 +175,16 @@ def transport(self) -> EkmServiceTransport:
return self._transport

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

@staticmethod
Expand All @@ -188,10 +197,18 @@ def parse_ekm_connection_path(path: str) -> Dict[str, str]:
return m.groupdict() if m else {}

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

@staticmethod
Expand All @@ -204,7 +221,9 @@ def parse_service_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 @@ -217,9 +236,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 @@ -228,9 +251,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 @@ -239,9 +266,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 @@ -250,10 +281,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,12 +556,20 @@ def sample_list_ekm_connections():
)

# 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.ListEkmConnectionsPager(
method=rpc, request=request, response=response, metadata=metadata,
method=rpc,
request=request,
response=response,
metadata=metadata,
)

# Done; return the response.
Expand Down Expand Up @@ -632,7 +675,12 @@ def sample_get_ekm_connection():
)

# 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 @@ -759,7 +807,12 @@ def sample_create_ekm_connection():
)

# 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 @@ -874,7 +927,12 @@ def sample_update_ekm_connection():
)

# 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 @@ -999,7 +1057,12 @@ def set_iam_policy(
)

# 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 @@ -1112,7 +1175,12 @@ def get_iam_policy(
)

# 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 @@ -1167,15 +1235,22 @@ def test_iam_permissions(
)

# 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


try:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
gapic_version=pkg_resources.get_distribution("google-cloud-kms",).version,
gapic_version=pkg_resources.get_distribution(
"google-cloud-kms",
).version,
)
except pkg_resources.DistributionNotFound:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()
Expand Down
Loading

0 comments on commit 949d051

Please sign in to comment.