Skip to content

Commit b5c1422

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

File tree

14 files changed

+846
-250
lines changed

14 files changed

+846
-250
lines changed

packages/google-cloud-iap/.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:2d13c2172a5d6129c861edaa48b60ead15aeaf58aa75e02d870c4cbdfa63aaba
16+
digest: sha256:7cffbc10910c3ab1b852c05114a08d374c195a81cdec1d4a67a1d129331d0bfe

packages/google-cloud-iap/docs/conf.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,13 @@
314314
# One entry per manual page. List of tuples
315315
# (source start file, name, description, authors, manual section).
316316
man_pages = [
317-
(root_doc, "google-cloud-iap", "google-cloud-iap Documentation", [author], 1,)
317+
(
318+
root_doc,
319+
"google-cloud-iap",
320+
"google-cloud-iap Documentation",
321+
[author],
322+
1,
323+
)
318324
]
319325

320326
# If true, show URL addresses after external links.
@@ -355,7 +361,10 @@
355361
intersphinx_mapping = {
356362
"python": ("https://python.readthedocs.org/en/latest/", None),
357363
"google-auth": ("https://googleapis.dev/python/google-auth/latest/", None),
358-
"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+
),
359368
"grpc": ("https://grpc.github.io/grpc/python/", None),
360369
"proto-plus": ("https://proto-plus-python.readthedocs.io/en/latest/", None),
361370
"protobuf": ("https://googleapis.dev/python/protobuf/latest/", None),

packages/google-cloud-iap/google/cloud/iap_v1/services/identity_aware_proxy_admin_service/async_client.py

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,12 @@ def sample_set_iam_policy():
334334
)
335335

336336
# Send the request.
337-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
337+
response = await rpc(
338+
request,
339+
retry=retry,
340+
timeout=timeout,
341+
metadata=metadata,
342+
)
338343

339344
# Done; return the response.
340345
return response
@@ -462,7 +467,12 @@ def sample_get_iam_policy():
462467
)
463468

464469
# Send the request.
465-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
470+
response = await rpc(
471+
request,
472+
retry=retry,
473+
timeout=timeout,
474+
metadata=metadata,
475+
)
466476

467477
# Done; return the response.
468478
return response
@@ -536,7 +546,12 @@ def sample_test_iam_permissions():
536546
)
537547

538548
# Send the request.
539-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
549+
response = await rpc(
550+
request,
551+
retry=retry,
552+
timeout=timeout,
553+
metadata=metadata,
554+
)
540555

541556
# Done; return the response.
542557
return response
@@ -603,7 +618,12 @@ def sample_get_iap_settings():
603618
)
604619

605620
# Send the request.
606-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
621+
response = await rpc(
622+
request,
623+
retry=retry,
624+
timeout=timeout,
625+
metadata=metadata,
626+
)
607627

608628
# Done; return the response.
609629
return response
@@ -676,7 +696,12 @@ def sample_update_iap_settings():
676696
)
677697

678698
# Send the request.
679-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
699+
response = await rpc(
700+
request,
701+
retry=retry,
702+
timeout=timeout,
703+
metadata=metadata,
704+
)
680705

681706
# Done; return the response.
682707
return response
@@ -690,7 +715,9 @@ async def __aexit__(self, exc_type, exc, tb):
690715

691716
try:
692717
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
693-
gapic_version=pkg_resources.get_distribution("google-cloud-iap",).version,
718+
gapic_version=pkg_resources.get_distribution(
719+
"google-cloud-iap",
720+
).version,
694721
)
695722
except pkg_resources.DistributionNotFound:
696723
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()

packages/google-cloud-iap/google/cloud/iap_v1/services/identity_aware_proxy_admin_service/client.py

Lines changed: 62 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ class IdentityAwareProxyAdminServiceClientMeta(type):
6262
] = IdentityAwareProxyAdminServiceGrpcAsyncIOTransport
6363

6464
def get_transport_class(
65-
cls, label: str = None,
65+
cls,
66+
label: str = None,
6667
) -> Type[IdentityAwareProxyAdminServiceTransport]:
6768
"""Returns an appropriate transport class.
6869
@@ -170,7 +171,9 @@ def transport(self) -> IdentityAwareProxyAdminServiceTransport:
170171
return self._transport
171172

172173
@staticmethod
173-
def common_billing_account_path(billing_account: str,) -> str:
174+
def common_billing_account_path(
175+
billing_account: str,
176+
) -> str:
174177
"""Returns a fully-qualified billing_account string."""
175178
return "billingAccounts/{billing_account}".format(
176179
billing_account=billing_account,
@@ -183,9 +186,13 @@ def parse_common_billing_account_path(path: str) -> Dict[str, str]:
183186
return m.groupdict() if m else {}
184187

185188
@staticmethod
186-
def common_folder_path(folder: str,) -> str:
189+
def common_folder_path(
190+
folder: str,
191+
) -> str:
187192
"""Returns a fully-qualified folder string."""
188-
return "folders/{folder}".format(folder=folder,)
193+
return "folders/{folder}".format(
194+
folder=folder,
195+
)
189196

190197
@staticmethod
191198
def parse_common_folder_path(path: str) -> Dict[str, str]:
@@ -194,9 +201,13 @@ def parse_common_folder_path(path: str) -> Dict[str, str]:
194201
return m.groupdict() if m else {}
195202

196203
@staticmethod
197-
def common_organization_path(organization: str,) -> str:
204+
def common_organization_path(
205+
organization: str,
206+
) -> str:
198207
"""Returns a fully-qualified organization string."""
199-
return "organizations/{organization}".format(organization=organization,)
208+
return "organizations/{organization}".format(
209+
organization=organization,
210+
)
200211

201212
@staticmethod
202213
def parse_common_organization_path(path: str) -> Dict[str, str]:
@@ -205,9 +216,13 @@ def parse_common_organization_path(path: str) -> Dict[str, str]:
205216
return m.groupdict() if m else {}
206217

207218
@staticmethod
208-
def common_project_path(project: str,) -> str:
219+
def common_project_path(
220+
project: str,
221+
) -> str:
209222
"""Returns a fully-qualified project string."""
210-
return "projects/{project}".format(project=project,)
223+
return "projects/{project}".format(
224+
project=project,
225+
)
211226

212227
@staticmethod
213228
def parse_common_project_path(path: str) -> Dict[str, str]:
@@ -216,10 +231,14 @@ def parse_common_project_path(path: str) -> Dict[str, str]:
216231
return m.groupdict() if m else {}
217232

218233
@staticmethod
219-
def common_location_path(project: str, location: str,) -> str:
234+
def common_location_path(
235+
project: str,
236+
location: str,
237+
) -> str:
220238
"""Returns a fully-qualified location string."""
221239
return "projects/{project}/locations/{location}".format(
222-
project=project, location=location,
240+
project=project,
241+
location=location,
223242
)
224243

225244
@staticmethod
@@ -515,7 +534,12 @@ def sample_set_iam_policy():
515534
)
516535

517536
# Send the request.
518-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
537+
response = rpc(
538+
request,
539+
retry=retry,
540+
timeout=timeout,
541+
metadata=metadata,
542+
)
519543

520544
# Done; return the response.
521545
return response
@@ -642,7 +666,12 @@ def sample_get_iam_policy():
642666
)
643667

644668
# Send the request.
645-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
669+
response = rpc(
670+
request,
671+
retry=retry,
672+
timeout=timeout,
673+
metadata=metadata,
674+
)
646675

647676
# Done; return the response.
648677
return response
@@ -715,7 +744,12 @@ def sample_test_iam_permissions():
715744
)
716745

717746
# Send the request.
718-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
747+
response = rpc(
748+
request,
749+
retry=retry,
750+
timeout=timeout,
751+
metadata=metadata,
752+
)
719753

720754
# Done; return the response.
721755
return response
@@ -783,7 +817,12 @@ def sample_get_iap_settings():
783817
)
784818

785819
# Send the request.
786-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
820+
response = rpc(
821+
request,
822+
retry=retry,
823+
timeout=timeout,
824+
metadata=metadata,
825+
)
787826

788827
# Done; return the response.
789828
return response
@@ -857,7 +896,12 @@ def sample_update_iap_settings():
857896
)
858897

859898
# Send the request.
860-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
899+
response = rpc(
900+
request,
901+
retry=retry,
902+
timeout=timeout,
903+
metadata=metadata,
904+
)
861905

862906
# Done; return the response.
863907
return response
@@ -878,7 +922,9 @@ def __exit__(self, type, value, traceback):
878922

879923
try:
880924
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
881-
gapic_version=pkg_resources.get_distribution("google-cloud-iap",).version,
925+
gapic_version=pkg_resources.get_distribution(
926+
"google-cloud-iap",
927+
).version,
882928
)
883929
except pkg_resources.DistributionNotFound:
884930
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()

packages/google-cloud-iap/google/cloud/iap_v1/services/identity_aware_proxy_admin_service/transports/base.py

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@
3131

3232
try:
3333
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
34-
gapic_version=pkg_resources.get_distribution("google-cloud-iap",).version,
34+
gapic_version=pkg_resources.get_distribution(
35+
"google-cloud-iap",
36+
).version,
3537
)
3638
except pkg_resources.DistributionNotFound:
3739
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()
@@ -121,30 +123,38 @@ def _prep_wrapped_messages(self, client_info):
121123
# Precompute the wrapped methods.
122124
self._wrapped_methods = {
123125
self.set_iam_policy: gapic_v1.method.wrap_method(
124-
self.set_iam_policy, default_timeout=None, client_info=client_info,
126+
self.set_iam_policy,
127+
default_timeout=None,
128+
client_info=client_info,
125129
),
126130
self.get_iam_policy: gapic_v1.method.wrap_method(
127-
self.get_iam_policy, default_timeout=None, client_info=client_info,
131+
self.get_iam_policy,
132+
default_timeout=None,
133+
client_info=client_info,
128134
),
129135
self.test_iam_permissions: gapic_v1.method.wrap_method(
130136
self.test_iam_permissions,
131137
default_timeout=None,
132138
client_info=client_info,
133139
),
134140
self.get_iap_settings: gapic_v1.method.wrap_method(
135-
self.get_iap_settings, default_timeout=None, client_info=client_info,
141+
self.get_iap_settings,
142+
default_timeout=None,
143+
client_info=client_info,
136144
),
137145
self.update_iap_settings: gapic_v1.method.wrap_method(
138-
self.update_iap_settings, default_timeout=None, client_info=client_info,
146+
self.update_iap_settings,
147+
default_timeout=None,
148+
client_info=client_info,
139149
),
140150
}
141151

142152
def close(self):
143153
"""Closes resources associated with the transport.
144154
145-
.. warning::
146-
Only call this method if the transport is NOT shared
147-
with other clients - this may cause errors in other clients!
155+
.. warning::
156+
Only call this method if the transport is NOT shared
157+
with other clients - this may cause errors in other clients!
148158
"""
149159
raise NotImplementedError()
150160

packages/google-cloud-iap/google/cloud/iap_v1/services/identity_aware_proxy_admin_service/transports/grpc.py

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

229229
@property
230230
def grpc_channel(self) -> grpc.Channel:
231-
"""Return the channel designed to connect to this service.
232-
"""
231+
"""Return the channel designed to connect to this service."""
233232
return self._grpc_channel
234233

235234
@property

0 commit comments

Comments
 (0)