Skip to content

Commit 550e89d

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

File tree

9 files changed

+632
-178
lines changed

9 files changed

+632
-178
lines changed

packages/google-cloud-ids/.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-ids/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-ids", "google-cloud-ids Documentation", [author], 1,)
317+
(
318+
root_doc,
319+
"google-cloud-ids",
320+
"google-cloud-ids 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-ids/google/cloud/ids_v1/services/ids/async_client.py

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -291,12 +291,20 @@ def sample_list_endpoints():
291291
)
292292

293293
# Send the request.
294-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
294+
response = await rpc(
295+
request,
296+
retry=retry,
297+
timeout=timeout,
298+
metadata=metadata,
299+
)
295300

296301
# This method is paged; wrap the response in a pager, which provides
297302
# an `__aiter__` convenience method.
298303
response = pagers.ListEndpointsAsyncPager(
299-
method=rpc, request=request, response=response, metadata=metadata,
304+
method=rpc,
305+
request=request,
306+
response=response,
307+
metadata=metadata,
300308
)
301309

302310
# Done; return the response.
@@ -397,7 +405,12 @@ def sample_get_endpoint():
397405
)
398406

399407
# Send the request.
400-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
408+
response = await rpc(
409+
request,
410+
retry=retry,
411+
timeout=timeout,
412+
metadata=metadata,
413+
)
401414

402415
# Done; return the response.
403416
return response
@@ -520,7 +533,12 @@ def sample_create_endpoint():
520533
)
521534

522535
# Send the request.
523-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
536+
response = await rpc(
537+
request,
538+
retry=retry,
539+
timeout=timeout,
540+
metadata=metadata,
541+
)
524542

525543
# Wrap the response in an operation future.
526544
response = operation_async.from_gapic(
@@ -634,7 +652,12 @@ def sample_delete_endpoint():
634652
)
635653

636654
# Send the request.
637-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
655+
response = await rpc(
656+
request,
657+
retry=retry,
658+
timeout=timeout,
659+
metadata=metadata,
660+
)
638661

639662
# Wrap the response in an operation future.
640663
response = operation_async.from_gapic(
@@ -656,7 +679,9 @@ async def __aexit__(self, exc_type, exc, tb):
656679

657680
try:
658681
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
659-
gapic_version=pkg_resources.get_distribution("google-cloud-ids",).version,
682+
gapic_version=pkg_resources.get_distribution(
683+
"google-cloud-ids",
684+
).version,
660685
)
661686
except pkg_resources.DistributionNotFound:
662687
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()

packages/google-cloud-ids/google/cloud/ids_v1/services/ids/client.py

Lines changed: 70 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ class IDSClientMeta(type):
5757
_transport_registry["grpc"] = IDSGrpcTransport
5858
_transport_registry["grpc_asyncio"] = IDSGrpcAsyncIOTransport
5959

60-
def get_transport_class(cls, label: str = None,) -> Type[IDSTransport]:
60+
def get_transport_class(
61+
cls,
62+
label: str = None,
63+
) -> Type[IDSTransport]:
6164
"""Returns an appropriate transport class.
6265
6366
Args:
@@ -162,10 +165,16 @@ def transport(self) -> IDSTransport:
162165
return self._transport
163166

164167
@staticmethod
165-
def endpoint_path(project: str, location: str, endpoint: str,) -> str:
168+
def endpoint_path(
169+
project: str,
170+
location: str,
171+
endpoint: str,
172+
) -> str:
166173
"""Returns a fully-qualified endpoint string."""
167174
return "projects/{project}/locations/{location}/endpoints/{endpoint}".format(
168-
project=project, location=location, endpoint=endpoint,
175+
project=project,
176+
location=location,
177+
endpoint=endpoint,
169178
)
170179

171180
@staticmethod
@@ -178,7 +187,9 @@ def parse_endpoint_path(path: str) -> Dict[str, str]:
178187
return m.groupdict() if m else {}
179188

180189
@staticmethod
181-
def common_billing_account_path(billing_account: str,) -> str:
190+
def common_billing_account_path(
191+
billing_account: str,
192+
) -> str:
182193
"""Returns a fully-qualified billing_account string."""
183194
return "billingAccounts/{billing_account}".format(
184195
billing_account=billing_account,
@@ -191,9 +202,13 @@ def parse_common_billing_account_path(path: str) -> Dict[str, str]:
191202
return m.groupdict() if m else {}
192203

193204
@staticmethod
194-
def common_folder_path(folder: str,) -> str:
205+
def common_folder_path(
206+
folder: str,
207+
) -> str:
195208
"""Returns a fully-qualified folder string."""
196-
return "folders/{folder}".format(folder=folder,)
209+
return "folders/{folder}".format(
210+
folder=folder,
211+
)
197212

198213
@staticmethod
199214
def parse_common_folder_path(path: str) -> Dict[str, str]:
@@ -202,9 +217,13 @@ def parse_common_folder_path(path: str) -> Dict[str, str]:
202217
return m.groupdict() if m else {}
203218

204219
@staticmethod
205-
def common_organization_path(organization: str,) -> str:
220+
def common_organization_path(
221+
organization: str,
222+
) -> str:
206223
"""Returns a fully-qualified organization string."""
207-
return "organizations/{organization}".format(organization=organization,)
224+
return "organizations/{organization}".format(
225+
organization=organization,
226+
)
208227

209228
@staticmethod
210229
def parse_common_organization_path(path: str) -> Dict[str, str]:
@@ -213,9 +232,13 @@ def parse_common_organization_path(path: str) -> Dict[str, str]:
213232
return m.groupdict() if m else {}
214233

215234
@staticmethod
216-
def common_project_path(project: str,) -> str:
235+
def common_project_path(
236+
project: str,
237+
) -> str:
217238
"""Returns a fully-qualified project string."""
218-
return "projects/{project}".format(project=project,)
239+
return "projects/{project}".format(
240+
project=project,
241+
)
219242

220243
@staticmethod
221244
def parse_common_project_path(path: str) -> Dict[str, str]:
@@ -224,10 +247,14 @@ def parse_common_project_path(path: str) -> Dict[str, str]:
224247
return m.groupdict() if m else {}
225248

226249
@staticmethod
227-
def common_location_path(project: str, location: str,) -> str:
250+
def common_location_path(
251+
project: str,
252+
location: str,
253+
) -> str:
228254
"""Returns a fully-qualified location string."""
229255
return "projects/{project}/locations/{location}".format(
230-
project=project, location=location,
256+
project=project,
257+
location=location,
231258
)
232259

233260
@staticmethod
@@ -487,12 +514,20 @@ def sample_list_endpoints():
487514
)
488515

489516
# Send the request.
490-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
517+
response = rpc(
518+
request,
519+
retry=retry,
520+
timeout=timeout,
521+
metadata=metadata,
522+
)
491523

492524
# This method is paged; wrap the response in a pager, which provides
493525
# an `__iter__` convenience method.
494526
response = pagers.ListEndpointsPager(
495-
method=rpc, request=request, response=response, metadata=metadata,
527+
method=rpc,
528+
request=request,
529+
response=response,
530+
metadata=metadata,
496531
)
497532

498533
# Done; return the response.
@@ -584,7 +619,12 @@ def sample_get_endpoint():
584619
)
585620

586621
# Send the request.
587-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
622+
response = rpc(
623+
request,
624+
retry=retry,
625+
timeout=timeout,
626+
metadata=metadata,
627+
)
588628

589629
# Done; return the response.
590630
return response
@@ -707,7 +747,12 @@ def sample_create_endpoint():
707747
)
708748

709749
# Send the request.
710-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
750+
response = rpc(
751+
request,
752+
retry=retry,
753+
timeout=timeout,
754+
metadata=metadata,
755+
)
711756

712757
# Wrap the response in an operation future.
713758
response = operation.from_gapic(
@@ -821,7 +866,12 @@ def sample_delete_endpoint():
821866
)
822867

823868
# Send the request.
824-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
869+
response = rpc(
870+
request,
871+
retry=retry,
872+
timeout=timeout,
873+
metadata=metadata,
874+
)
825875

826876
# Wrap the response in an operation future.
827877
response = operation.from_gapic(
@@ -850,7 +900,9 @@ def __exit__(self, type, value, traceback):
850900

851901
try:
852902
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
853-
gapic_version=pkg_resources.get_distribution("google-cloud-ids",).version,
903+
gapic_version=pkg_resources.get_distribution(
904+
"google-cloud-ids",
905+
).version,
854906
)
855907
except pkg_resources.DistributionNotFound:
856908
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()

packages/google-cloud-ids/google/cloud/ids_v1/services/ids/transports/base.py

Lines changed: 12 additions & 6 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-ids",).version,
34+
gapic_version=pkg_resources.get_distribution(
35+
"google-cloud-ids",
36+
).version,
3537
)
3638
except pkg_resources.DistributionNotFound:
3739
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()
@@ -149,19 +151,23 @@ def _prep_wrapped_messages(self, client_info):
149151
client_info=client_info,
150152
),
151153
self.create_endpoint: gapic_v1.method.wrap_method(
152-
self.create_endpoint, default_timeout=3600.0, client_info=client_info,
154+
self.create_endpoint,
155+
default_timeout=3600.0,
156+
client_info=client_info,
153157
),
154158
self.delete_endpoint: gapic_v1.method.wrap_method(
155-
self.delete_endpoint, default_timeout=3600.0, client_info=client_info,
159+
self.delete_endpoint,
160+
default_timeout=3600.0,
161+
client_info=client_info,
156162
),
157163
}
158164

159165
def close(self):
160166
"""Closes resources associated with the transport.
161167
162-
.. warning::
163-
Only call this method if the transport is NOT shared
164-
with other clients - this may cause errors in other clients!
168+
.. warning::
169+
Only call this method if the transport is NOT shared
170+
with other clients - this may cause errors in other clients!
165171
"""
166172
raise NotImplementedError()
167173

packages/google-cloud-ids/google/cloud/ids_v1/services/ids/transports/grpc.py

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

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

234233
@property

0 commit comments

Comments
 (0)