Skip to content

Commit

Permalink
chore(python): use black==22.3.0 (#95)
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] committed Mar 28, 2022
1 parent bb2f062 commit b9c7adc
Show file tree
Hide file tree
Showing 9 changed files with 691 additions and 190 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-private-catalog/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 @@ -298,12 +298,20 @@ def sample_search_catalogs():
)

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

# Done; return the response.
Expand Down Expand Up @@ -379,12 +387,20 @@ def sample_search_products():
)

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

# Done; return the response.
Expand Down Expand Up @@ -461,12 +477,20 @@ def sample_search_versions():
)

# 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.SearchVersionsAsyncPager(
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 @@ -55,7 +55,10 @@ class PrivateCatalogClientMeta(type):
_transport_registry["grpc"] = PrivateCatalogGrpcTransport
_transport_registry["grpc_asyncio"] = PrivateCatalogGrpcAsyncIOTransport

def get_transport_class(cls, label: str = None,) -> Type[PrivateCatalogTransport]:
def get_transport_class(
cls,
label: str = None,
) -> Type[PrivateCatalogTransport]:
"""Returns an appropriate transport class.
Args:
Expand Down Expand Up @@ -182,9 +185,13 @@ def transport(self) -> PrivateCatalogTransport:
return self._transport

@staticmethod
def catalog_path(catalog: str,) -> str:
def catalog_path(
catalog: str,
) -> str:
"""Returns a fully-qualified catalog string."""
return "catalogs/{catalog}".format(catalog=catalog,)
return "catalogs/{catalog}".format(
catalog=catalog,
)

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

@staticmethod
def product_path(product: str,) -> str:
def product_path(
product: str,
) -> str:
"""Returns a fully-qualified product string."""
return "products/{product}".format(product=product,)
return "products/{product}".format(
product=product,
)

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

@staticmethod
def version_path(catalog: str, product: str, version: str,) -> str:
def version_path(
catalog: str,
product: str,
version: str,
) -> str:
"""Returns a fully-qualified version string."""
return "catalogs/{catalog}/products/{product}/versions/{version}".format(
catalog=catalog, product=product, version=version,
catalog=catalog,
product=product,
version=version,
)

@staticmethod
Expand All @@ -220,7 +237,9 @@ def parse_version_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 @@ -233,9 +252,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 @@ -244,9 +267,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 @@ -255,9 +282,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 @@ -266,10 +297,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 @@ -514,12 +549,20 @@ def sample_search_catalogs():
)

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

# Done; return the response.
Expand Down Expand Up @@ -596,12 +639,20 @@ def sample_search_products():
)

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

# Done; return the response.
Expand Down Expand Up @@ -679,12 +730,20 @@ def sample_search_versions():
)

# 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.SearchVersionsPager(
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 @@ -121,22 +121,28 @@ def _prep_wrapped_messages(self, client_info):
# Precompute the wrapped methods.
self._wrapped_methods = {
self.search_catalogs: gapic_v1.method.wrap_method(
self.search_catalogs, default_timeout=None, client_info=client_info,
self.search_catalogs,
default_timeout=None,
client_info=client_info,
),
self.search_products: gapic_v1.method.wrap_method(
self.search_products, default_timeout=None, client_info=client_info,
self.search_products,
default_timeout=None,
client_info=client_info,
),
self.search_versions: gapic_v1.method.wrap_method(
self.search_versions, default_timeout=None, client_info=client_info,
self.search_versions,
default_timeout=None,
client_info=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 @@ -245,8 +245,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 b9c7adc

Please sign in to comment.