Skip to content

Commit e1ca1f4

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

9 files changed

Lines changed: 608 additions & 190 deletions

File tree

packages/google-cloud-access-approval/.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-access-approval/docs/conf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,10 @@
361361
intersphinx_mapping = {
362362
"python": ("https://python.readthedocs.org/en/latest/", None),
363363
"google-auth": ("https://googleapis.dev/python/google-auth/latest/", None),
364-
"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+
),
365368
"grpc": ("https://grpc.github.io/grpc/python/", None),
366369
"proto-plus": ("https://proto-plus-python.readthedocs.io/en/latest/", None),
367370
"protobuf": ("https://googleapis.dev/python/protobuf/latest/", None),

packages/google-cloud-access-approval/google/cloud/accessapproval_v1/services/access_approval/async_client.py

Lines changed: 44 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -349,12 +349,20 @@ def sample_list_approval_requests():
349349
)
350350

351351
# Send the request.
352-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
352+
response = await rpc(
353+
request,
354+
retry=retry,
355+
timeout=timeout,
356+
metadata=metadata,
357+
)
353358

354359
# This method is paged; wrap the response in a pager, which provides
355360
# an `__aiter__` convenience method.
356361
response = pagers.ListApprovalRequestsAsyncPager(
357-
method=rpc, request=request, response=response, metadata=metadata,
362+
method=rpc,
363+
request=request,
364+
response=response,
365+
metadata=metadata,
358366
)
359367

360368
# Done; return the response.
@@ -454,7 +462,12 @@ def sample_get_approval_request():
454462
)
455463

456464
# Send the request.
457-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
465+
response = await rpc(
466+
request,
467+
retry=retry,
468+
timeout=timeout,
469+
metadata=metadata,
470+
)
458471

459472
# Done; return the response.
460473
return response
@@ -526,7 +539,12 @@ def sample_approve_approval_request():
526539
)
527540

528541
# Send the request.
529-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
542+
response = await rpc(
543+
request,
544+
retry=retry,
545+
timeout=timeout,
546+
metadata=metadata,
547+
)
530548

531549
# Done; return the response.
532550
return response
@@ -603,7 +621,12 @@ def sample_dismiss_approval_request():
603621
)
604622

605623
# Send the request.
606-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
624+
response = await rpc(
625+
request,
626+
retry=retry,
627+
timeout=timeout,
628+
metadata=metadata,
629+
)
607630

608631
# Done; return the response.
609632
return response
@@ -705,7 +728,12 @@ def sample_get_access_approval_settings():
705728
)
706729

707730
# Send the request.
708-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
731+
response = await rpc(
732+
request,
733+
retry=retry,
734+
timeout=timeout,
735+
metadata=metadata,
736+
)
709737

710738
# Done; return the response.
711739
return response
@@ -817,7 +845,12 @@ def sample_update_access_approval_settings():
817845
)
818846

819847
# Send the request.
820-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
848+
response = await rpc(
849+
request,
850+
retry=retry,
851+
timeout=timeout,
852+
metadata=metadata,
853+
)
821854

822855
# Done; return the response.
823856
return response
@@ -906,7 +939,10 @@ def sample_delete_access_approval_settings():
906939

907940
# Send the request.
908941
await rpc(
909-
request, retry=retry, timeout=timeout, metadata=metadata,
942+
request,
943+
retry=retry,
944+
timeout=timeout,
945+
metadata=metadata,
910946
)
911947

912948
async def __aenter__(self):

packages/google-cloud-access-approval/google/cloud/accessapproval_v1/services/access_approval/client.py

Lines changed: 87 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ class AccessApprovalClientMeta(type):
5757
_transport_registry["grpc"] = AccessApprovalGrpcTransport
5858
_transport_registry["grpc_asyncio"] = AccessApprovalGrpcAsyncIOTransport
5959

60-
def get_transport_class(cls, label: str = None,) -> Type[AccessApprovalTransport]:
60+
def get_transport_class(
61+
cls,
62+
label: str = None,
63+
) -> Type[AccessApprovalTransport]:
6164
"""Returns an appropriate transport class.
6265
6366
Args:
@@ -197,9 +200,13 @@ def transport(self) -> AccessApprovalTransport:
197200
return self._transport
198201

199202
@staticmethod
200-
def access_approval_settings_path(project: str,) -> str:
203+
def access_approval_settings_path(
204+
project: str,
205+
) -> str:
201206
"""Returns a fully-qualified access_approval_settings string."""
202-
return "projects/{project}/accessApprovalSettings".format(project=project,)
207+
return "projects/{project}/accessApprovalSettings".format(
208+
project=project,
209+
)
203210

204211
@staticmethod
205212
def parse_access_approval_settings_path(path: str) -> Dict[str, str]:
@@ -208,10 +215,14 @@ def parse_access_approval_settings_path(path: str) -> Dict[str, str]:
208215
return m.groupdict() if m else {}
209216

210217
@staticmethod
211-
def approval_request_path(project: str, approval_request: str,) -> str:
218+
def approval_request_path(
219+
project: str,
220+
approval_request: str,
221+
) -> str:
212222
"""Returns a fully-qualified approval_request string."""
213223
return "projects/{project}/approvalRequests/{approval_request}".format(
214-
project=project, approval_request=approval_request,
224+
project=project,
225+
approval_request=approval_request,
215226
)
216227

217228
@staticmethod
@@ -224,7 +235,9 @@ def parse_approval_request_path(path: str) -> Dict[str, str]:
224235
return m.groupdict() if m else {}
225236

226237
@staticmethod
227-
def common_billing_account_path(billing_account: str,) -> str:
238+
def common_billing_account_path(
239+
billing_account: str,
240+
) -> str:
228241
"""Returns a fully-qualified billing_account string."""
229242
return "billingAccounts/{billing_account}".format(
230243
billing_account=billing_account,
@@ -237,9 +250,13 @@ def parse_common_billing_account_path(path: str) -> Dict[str, str]:
237250
return m.groupdict() if m else {}
238251

239252
@staticmethod
240-
def common_folder_path(folder: str,) -> str:
253+
def common_folder_path(
254+
folder: str,
255+
) -> str:
241256
"""Returns a fully-qualified folder string."""
242-
return "folders/{folder}".format(folder=folder,)
257+
return "folders/{folder}".format(
258+
folder=folder,
259+
)
243260

244261
@staticmethod
245262
def parse_common_folder_path(path: str) -> Dict[str, str]:
@@ -248,9 +265,13 @@ def parse_common_folder_path(path: str) -> Dict[str, str]:
248265
return m.groupdict() if m else {}
249266

250267
@staticmethod
251-
def common_organization_path(organization: str,) -> str:
268+
def common_organization_path(
269+
organization: str,
270+
) -> str:
252271
"""Returns a fully-qualified organization string."""
253-
return "organizations/{organization}".format(organization=organization,)
272+
return "organizations/{organization}".format(
273+
organization=organization,
274+
)
254275

255276
@staticmethod
256277
def parse_common_organization_path(path: str) -> Dict[str, str]:
@@ -259,9 +280,13 @@ def parse_common_organization_path(path: str) -> Dict[str, str]:
259280
return m.groupdict() if m else {}
260281

261282
@staticmethod
262-
def common_project_path(project: str,) -> str:
283+
def common_project_path(
284+
project: str,
285+
) -> str:
263286
"""Returns a fully-qualified project string."""
264-
return "projects/{project}".format(project=project,)
287+
return "projects/{project}".format(
288+
project=project,
289+
)
265290

266291
@staticmethod
267292
def parse_common_project_path(path: str) -> Dict[str, str]:
@@ -270,10 +295,14 @@ def parse_common_project_path(path: str) -> Dict[str, str]:
270295
return m.groupdict() if m else {}
271296

272297
@staticmethod
273-
def common_location_path(project: str, location: str,) -> str:
298+
def common_location_path(
299+
project: str,
300+
location: str,
301+
) -> str:
274302
"""Returns a fully-qualified location string."""
275303
return "projects/{project}/locations/{location}".format(
276-
project=project, location=location,
304+
project=project,
305+
location=location,
277306
)
278307

279308
@staticmethod
@@ -540,12 +569,20 @@ def sample_list_approval_requests():
540569
)
541570

542571
# Send the request.
543-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
572+
response = rpc(
573+
request,
574+
retry=retry,
575+
timeout=timeout,
576+
metadata=metadata,
577+
)
544578

545579
# This method is paged; wrap the response in a pager, which provides
546580
# an `__iter__` convenience method.
547581
response = pagers.ListApprovalRequestsPager(
548-
method=rpc, request=request, response=response, metadata=metadata,
582+
method=rpc,
583+
request=request,
584+
response=response,
585+
metadata=metadata,
549586
)
550587

551588
# Done; return the response.
@@ -636,7 +673,12 @@ def sample_get_approval_request():
636673
)
637674

638675
# Send the request.
639-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
676+
response = rpc(
677+
request,
678+
retry=retry,
679+
timeout=timeout,
680+
metadata=metadata,
681+
)
640682

641683
# Done; return the response.
642684
return response
@@ -709,7 +751,12 @@ def sample_approve_approval_request():
709751
)
710752

711753
# Send the request.
712-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
754+
response = rpc(
755+
request,
756+
retry=retry,
757+
timeout=timeout,
758+
metadata=metadata,
759+
)
713760

714761
# Done; return the response.
715762
return response
@@ -787,7 +834,12 @@ def sample_dismiss_approval_request():
787834
)
788835

789836
# Send the request.
790-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
837+
response = rpc(
838+
request,
839+
retry=retry,
840+
timeout=timeout,
841+
metadata=metadata,
842+
)
791843

792844
# Done; return the response.
793845
return response
@@ -882,7 +934,12 @@ def sample_get_access_approval_settings():
882934
)
883935

884936
# Send the request.
885-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
937+
response = rpc(
938+
request,
939+
retry=retry,
940+
timeout=timeout,
941+
metadata=metadata,
942+
)
886943

887944
# Done; return the response.
888945
return response
@@ -996,7 +1053,12 @@ def sample_update_access_approval_settings():
9961053
)
9971054

9981055
# Send the request.
999-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
1056+
response = rpc(
1057+
request,
1058+
retry=retry,
1059+
timeout=timeout,
1060+
metadata=metadata,
1061+
)
10001062

10011063
# Done; return the response.
10021064
return response
@@ -1087,7 +1149,10 @@ def sample_delete_access_approval_settings():
10871149

10881150
# Send the request.
10891151
rpc(
1090-
request, retry=retry, timeout=timeout, metadata=metadata,
1152+
request,
1153+
retry=retry,
1154+
timeout=timeout,
1155+
metadata=metadata,
10911156
)
10921157

10931158
def __enter__(self):

packages/google-cloud-access-approval/google/cloud/accessapproval_v1/services/access_approval/transports/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,9 @@ def _prep_wrapped_messages(self, client_info):
188188
def close(self):
189189
"""Closes resources associated with the transport.
190190
191-
.. warning::
192-
Only call this method if the transport is NOT shared
193-
with other clients - this may cause errors in other clients!
191+
.. warning::
192+
Only call this method if the transport is NOT shared
193+
with other clients - this may cause errors in other clients!
194194
"""
195195
raise NotImplementedError()
196196

packages/google-cloud-access-approval/google/cloud/accessapproval_v1/services/access_approval/transports/grpc.py

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

260260
@property
261261
def grpc_channel(self) -> grpc.Channel:
262-
"""Return the channel designed to connect to this service.
263-
"""
262+
"""Return the channel designed to connect to this service."""
264263
return self._grpc_channel
265264

266265
@property

0 commit comments

Comments
 (0)