Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

Commit 785511e

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

17 files changed

Lines changed: 1099 additions & 317 deletions

File tree

.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

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),

google/cloud/billing/budgets_v1/services/budget_service/async_client.py

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,12 @@ def sample_create_budget():
311311
)
312312

313313
# Send the request.
314-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
314+
response = await rpc(
315+
request,
316+
retry=retry,
317+
timeout=timeout,
318+
metadata=metadata,
319+
)
315320

316321
# Done; return the response.
317322
return response
@@ -438,7 +443,12 @@ def sample_update_budget():
438443
)
439444

440445
# Send the request.
441-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
446+
response = await rpc(
447+
request,
448+
retry=retry,
449+
timeout=timeout,
450+
metadata=metadata,
451+
)
442452

443453
# Done; return the response.
444454
return response
@@ -550,7 +560,12 @@ def sample_get_budget():
550560
)
551561

552562
# Send the request.
553-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
563+
response = await rpc(
564+
request,
565+
retry=retry,
566+
timeout=timeout,
567+
metadata=metadata,
568+
)
554569

555570
# Done; return the response.
556571
return response
@@ -659,12 +674,20 @@ def sample_list_budgets():
659674
)
660675

661676
# Send the request.
662-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
677+
response = await rpc(
678+
request,
679+
retry=retry,
680+
timeout=timeout,
681+
metadata=metadata,
682+
)
663683

664684
# This method is paged; wrap the response in a pager, which provides
665685
# an `__aiter__` convenience method.
666686
response = pagers.ListBudgetsAsyncPager(
667-
method=rpc, request=request, response=response, metadata=metadata,
687+
method=rpc,
688+
request=request,
689+
response=response,
690+
metadata=metadata,
668691
)
669692

670693
# Done; return the response.
@@ -759,7 +782,10 @@ def sample_delete_budget():
759782

760783
# Send the request.
761784
await rpc(
762-
request, retry=retry, timeout=timeout, metadata=metadata,
785+
request,
786+
retry=retry,
787+
timeout=timeout,
788+
metadata=metadata,
763789
)
764790

765791
async def __aenter__(self):

google/cloud/billing/budgets_v1/services/budget_service/client.py

Lines changed: 69 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ class BudgetServiceClientMeta(type):
5555
_transport_registry["grpc"] = BudgetServiceGrpcTransport
5656
_transport_registry["grpc_asyncio"] = BudgetServiceGrpcAsyncIOTransport
5757

58-
def get_transport_class(cls, label: str = None,) -> Type[BudgetServiceTransport]:
58+
def get_transport_class(
59+
cls,
60+
label: str = None,
61+
) -> Type[BudgetServiceTransport]:
5962
"""Returns an appropriate transport class.
6063
6164
Args:
@@ -163,10 +166,14 @@ def transport(self) -> BudgetServiceTransport:
163166
return self._transport
164167

165168
@staticmethod
166-
def budget_path(billing_account: str, budget: str,) -> str:
169+
def budget_path(
170+
billing_account: str,
171+
budget: str,
172+
) -> str:
167173
"""Returns a fully-qualified budget string."""
168174
return "billingAccounts/{billing_account}/budgets/{budget}".format(
169-
billing_account=billing_account, budget=budget,
175+
billing_account=billing_account,
176+
budget=budget,
170177
)
171178

172179
@staticmethod
@@ -178,7 +185,9 @@ def parse_budget_path(path: str) -> Dict[str, str]:
178185
return m.groupdict() if m else {}
179186

180187
@staticmethod
181-
def common_billing_account_path(billing_account: str,) -> str:
188+
def common_billing_account_path(
189+
billing_account: str,
190+
) -> str:
182191
"""Returns a fully-qualified billing_account string."""
183192
return "billingAccounts/{billing_account}".format(
184193
billing_account=billing_account,
@@ -191,9 +200,13 @@ def parse_common_billing_account_path(path: str) -> Dict[str, str]:
191200
return m.groupdict() if m else {}
192201

193202
@staticmethod
194-
def common_folder_path(folder: str,) -> str:
203+
def common_folder_path(
204+
folder: str,
205+
) -> str:
195206
"""Returns a fully-qualified folder string."""
196-
return "folders/{folder}".format(folder=folder,)
207+
return "folders/{folder}".format(
208+
folder=folder,
209+
)
197210

198211
@staticmethod
199212
def parse_common_folder_path(path: str) -> Dict[str, str]:
@@ -202,9 +215,13 @@ def parse_common_folder_path(path: str) -> Dict[str, str]:
202215
return m.groupdict() if m else {}
203216

204217
@staticmethod
205-
def common_organization_path(organization: str,) -> str:
218+
def common_organization_path(
219+
organization: str,
220+
) -> str:
206221
"""Returns a fully-qualified organization string."""
207-
return "organizations/{organization}".format(organization=organization,)
222+
return "organizations/{organization}".format(
223+
organization=organization,
224+
)
208225

209226
@staticmethod
210227
def parse_common_organization_path(path: str) -> Dict[str, str]:
@@ -213,9 +230,13 @@ def parse_common_organization_path(path: str) -> Dict[str, str]:
213230
return m.groupdict() if m else {}
214231

215232
@staticmethod
216-
def common_project_path(project: str,) -> str:
233+
def common_project_path(
234+
project: str,
235+
) -> str:
217236
"""Returns a fully-qualified project string."""
218-
return "projects/{project}".format(project=project,)
237+
return "projects/{project}".format(
238+
project=project,
239+
)
219240

220241
@staticmethod
221242
def parse_common_project_path(path: str) -> Dict[str, str]:
@@ -224,10 +245,14 @@ def parse_common_project_path(path: str) -> Dict[str, str]:
224245
return m.groupdict() if m else {}
225246

226247
@staticmethod
227-
def common_location_path(project: str, location: str,) -> str:
248+
def common_location_path(
249+
project: str,
250+
location: str,
251+
) -> str:
228252
"""Returns a fully-qualified location string."""
229253
return "projects/{project}/locations/{location}".format(
230-
project=project, location=location,
254+
project=project,
255+
location=location,
231256
)
232257

233258
@staticmethod
@@ -505,7 +530,12 @@ def sample_create_budget():
505530
)
506531

507532
# Send the request.
508-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
533+
response = rpc(
534+
request,
535+
retry=retry,
536+
timeout=timeout,
537+
metadata=metadata,
538+
)
509539

510540
# Done; return the response.
511541
return response
@@ -622,7 +652,12 @@ def sample_update_budget():
622652
)
623653

624654
# Send the request.
625-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
655+
response = rpc(
656+
request,
657+
retry=retry,
658+
timeout=timeout,
659+
metadata=metadata,
660+
)
626661

627662
# Done; return the response.
628663
return response
@@ -724,7 +759,12 @@ def sample_get_budget():
724759
)
725760

726761
# Send the request.
727-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
762+
response = rpc(
763+
request,
764+
retry=retry,
765+
timeout=timeout,
766+
metadata=metadata,
767+
)
728768

729769
# Done; return the response.
730770
return response
@@ -823,12 +863,20 @@ def sample_list_budgets():
823863
)
824864

825865
# Send the request.
826-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
866+
response = rpc(
867+
request,
868+
retry=retry,
869+
timeout=timeout,
870+
metadata=metadata,
871+
)
827872

828873
# This method is paged; wrap the response in a pager, which provides
829874
# an `__iter__` convenience method.
830875
response = pagers.ListBudgetsPager(
831-
method=rpc, request=request, response=response, metadata=metadata,
876+
method=rpc,
877+
request=request,
878+
response=response,
879+
metadata=metadata,
832880
)
833881

834882
# Done; return the response.
@@ -913,7 +961,10 @@ def sample_delete_budget():
913961

914962
# Send the request.
915963
rpc(
916-
request, retry=retry, timeout=timeout, metadata=metadata,
964+
request,
965+
retry=retry,
966+
timeout=timeout,
967+
metadata=metadata,
917968
)
918969

919970
def __enter__(self):

google/cloud/billing/budgets_v1/services/budget_service/transports/base.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ def _prep_wrapped_messages(self, client_info):
126126
# Precompute the wrapped methods.
127127
self._wrapped_methods = {
128128
self.create_budget: gapic_v1.method.wrap_method(
129-
self.create_budget, default_timeout=60.0, client_info=client_info,
129+
self.create_budget,
130+
default_timeout=60.0,
131+
client_info=client_info,
130132
),
131133
self.update_budget: gapic_v1.method.wrap_method(
132134
self.update_budget,
@@ -193,9 +195,9 @@ def _prep_wrapped_messages(self, client_info):
193195
def close(self):
194196
"""Closes resources associated with the transport.
195197
196-
.. warning::
197-
Only call this method if the transport is NOT shared
198-
with other clients - this may cause errors in other clients!
198+
.. warning::
199+
Only call this method if the transport is NOT shared
200+
with other clients - this may cause errors in other clients!
199201
"""
200202
raise NotImplementedError()
201203

google/cloud/billing/budgets_v1/services/budget_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)