Skip to content

Commit

Permalink
chore(python): use black==22.3.0 (#75)
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 399fd98 commit b5c1422
Show file tree
Hide file tree
Showing 14 changed files with 846 additions and 250 deletions.
2 changes: 1 addition & 1 deletion packages/google-cloud-iap/.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:2d13c2172a5d6129c861edaa48b60ead15aeaf58aa75e02d870c4cbdfa63aaba
digest: sha256:7cffbc10910c3ab1b852c05114a08d374c195a81cdec1d4a67a1d129331d0bfe
13 changes: 11 additions & 2 deletions packages/google-cloud-iap/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-iap", "google-cloud-iap Documentation", [author], 1,)
(
root_doc,
"google-cloud-iap",
"google-cloud-iap 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 @@ -334,7 +334,12 @@ def sample_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 @@ -462,7 +467,12 @@ def sample_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 @@ -536,7 +546,12 @@ def sample_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 Down Expand Up @@ -603,7 +618,12 @@ def sample_get_iap_settings():
)

# 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 @@ -676,7 +696,12 @@ def sample_update_iap_settings():
)

# 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 @@ -690,7 +715,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-iap",).version,
gapic_version=pkg_resources.get_distribution(
"google-cloud-iap",
).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 @@ -62,7 +62,8 @@ class IdentityAwareProxyAdminServiceClientMeta(type):
] = IdentityAwareProxyAdminServiceGrpcAsyncIOTransport

def get_transport_class(
cls, label: str = None,
cls,
label: str = None,
) -> Type[IdentityAwareProxyAdminServiceTransport]:
"""Returns an appropriate transport class.
Expand Down Expand Up @@ -170,7 +171,9 @@ def transport(self) -> IdentityAwareProxyAdminServiceTransport:
return self._transport

@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 @@ -183,9 +186,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 @@ -194,9 +201,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 @@ -205,9 +216,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 @@ -216,10 +231,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 @@ -515,7 +534,12 @@ def sample_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 @@ -642,7 +666,12 @@ def sample_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 @@ -715,7 +744,12 @@ def sample_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
Expand Down Expand Up @@ -783,7 +817,12 @@ def sample_get_iap_settings():
)

# 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 @@ -857,7 +896,12 @@ def sample_update_iap_settings():
)

# 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 All @@ -878,7 +922,9 @@ def __exit__(self, type, value, traceback):

try:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
gapic_version=pkg_resources.get_distribution("google-cloud-iap",).version,
gapic_version=pkg_resources.get_distribution(
"google-cloud-iap",
).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 @@ -31,7 +31,9 @@

try:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
gapic_version=pkg_resources.get_distribution("google-cloud-iap",).version,
gapic_version=pkg_resources.get_distribution(
"google-cloud-iap",
).version,
)
except pkg_resources.DistributionNotFound:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()
Expand Down Expand Up @@ -121,30 +123,38 @@ def _prep_wrapped_messages(self, client_info):
# Precompute the wrapped methods.
self._wrapped_methods = {
self.set_iam_policy: gapic_v1.method.wrap_method(
self.set_iam_policy, default_timeout=None, client_info=client_info,
self.set_iam_policy,
default_timeout=None,
client_info=client_info,
),
self.get_iam_policy: gapic_v1.method.wrap_method(
self.get_iam_policy, default_timeout=None, client_info=client_info,
self.get_iam_policy,
default_timeout=None,
client_info=client_info,
),
self.test_iam_permissions: gapic_v1.method.wrap_method(
self.test_iam_permissions,
default_timeout=None,
client_info=client_info,
),
self.get_iap_settings: gapic_v1.method.wrap_method(
self.get_iap_settings, default_timeout=None, client_info=client_info,
self.get_iap_settings,
default_timeout=None,
client_info=client_info,
),
self.update_iap_settings: gapic_v1.method.wrap_method(
self.update_iap_settings, default_timeout=None, client_info=client_info,
self.update_iap_settings,
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 @@ -228,8 +228,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 b5c1422

Please sign in to comment.