10000 chore(python): use black==22.3.0 (#274) · googleapis/google-cloud-python@c7d7357 · GitHub
[go: up one dir, main page]

Skip to content

Commit c7d7357

Browse files
chore(python): use black==22.3.0 (#274)
Source-Link: googleapis/synthtool@6fab84a Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:7cffbc10910c3ab1b852c05114a08d374c195a81cdec1d4a67a1d129331d0bfe Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 2cf1856 commit c7d7357

File tree

16 files changed

+636
-186
lines changed

16 files changed

+636
-186
lines changed

packages/google-cloud-texttospeech/.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-texttospeech/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-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech/async_client.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,12 @@ def sample_list_voices():
282282
)
283283

284284
# Send the request.
285-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
285+
response = await rpc(
286+
request,
287+
retry=retry,
288+
67E6 timeout=timeout,
289+
metadata=metadata,
290+
)
286291

287292
# Done; return the response.
288293
return response
@@ -399,7 +404,12 @@ def sample_synthesize_speech():
399404
)
400405

401406
# Send the request.
402-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
407+
response = await rpc(
408+
request,
409+
retry=retry,
410+
timeout=timeout,
411+
metadata=metadata,
412+
)
403413

404414
# Done; return the response.
405415
return response

packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech/client.py

Lines changed: 51 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ class TextToSpeechClientMeta(type):
5252
_transport_registry["grpc"] = TextToSpeechGrpcTransport
5353
_transport_registry["grpc_asyncio"] = TextToSpeechGrpcAsyncIOTransport
5454

55-
def get_transport_class(cls, label: str = None,) -> Type[TextToSpeechTransport]:
55+
def get_transport_class(
56+
cls,
57+
label: str = None,
58+
) -> Type[TextToSpeechTransport]:
5659
"""Returns an appropriate transport class.
5760
5861
Args:
@@ -157,10 +160,16 @@ def transport(self) -> TextToSpeechTransport:
157160
return self._transport
158161

159162
@staticmethod
160-
def model_path(project: str, location: str, model: str,) -> str:
163+
def model_path(
164+
project: str,
165+
location: str,
166+
model: str,
167+
) -> str:
161168
"""Returns a fully-qualified model string."""
162169
return "projects/{project}/locations/{location}/models/{model}".format(
163-
project=project, location=location, model=model,
170+
project=project,
171+
location=location,
172+
model=model,
164173
)
165174

166175
@staticmethod
@@ -173,7 +182,9 @@ def parse_model_path(path: str) -> Dict[str, str]:
173182
return m.groupdict() if m else {}
174183

175184
@staticmethod
176-
def common_billing_account_path(billing_account: str,) -> str:
185+
def common_billing_account_path(
186+
billing_account: str,
187+
) -> str:
177188
"""Returns a fully-qualified billing_account string."""
178189
return "billingAccounts/{billing_account}".format(
179190
billing_account=billing_account,
@@ -186,9 +197,13 @@ def parse_common_billing_account_path(path: str) -> Dict[str, str]:
186197
return m.groupdict() if m else {}
187198

188199
@staticmethod
189-
def common_folder_path(folder: str,) -> str:
200+
def common_folder_path(
201+
folder: str,
202+
) -> str:
190203
"""Returns a fully-qualified folder string."""
191-
return "folders/{folder}".format(folder=folder,)
204+
return "folders/{folder}".format(
205+
folder=folder,
206+
)
192207

193208
@staticmethod
194209
def parse_common_folder_path(path: str) -> Dict[str, str]:
@@ -197,9 +212,13 @@ def parse_common_folder_path(path: str) -> Dict[str, str]:
197212
return m.groupdict() if m else {}
198213

199214
@staticmethod
200-
def common_organization_path(organization: str,) -> str:
215+
def common_organization_path(
216+
organization: str,
217+
) -> str:
201218
"""Returns a fully-qualified organization string."""
202-
return "organizations/{organization}".format(organization=organization,)
219+
return "organizations/{organization}".format(
220+
organization=organization,
221+
)
203222

204223
@staticmethod
205224
def parse_common_organization_path(path: str) -> Dict[str, str]:
@@ -208,9 +227,13 @@ def parse_common_organization_path(path: str) -> Dict[str, str]:
208227
return m.groupdict() if m else {}
209228

210229
@staticmethod
211-
def common_project_path(project: str,) -> str:
230+
def common_project_path(
231+
project: str,
232+
) -> str:
212233
"""Returns a fully-qualified project string."""
213-
return "projects/{project}".format(project=project,)
234+
return "projects/{project}".format(
235+
project=project,
236+
)
214237

215238
@staticmethod
216239
def parse_common_project_path(path: str) -> Dict[str, str]:
@@ -219,10 +242,14 @@ def parse_common_project_path(path: str) -> Dict[str, str]:
219242
return m.groupdict() if m else {}
220243

221244
@staticmethod
222-
def common_location_path(project: str, location: str,) -> str:
245+
def common_location_path(
246+
project: str,
247+
location: str,
248+
) -> str:
223249
"""Returns a fully-qualified location string."""
224250
return "projects/{project}/locations/{location}".format(
225-
project=project, location=location,
251+
project=project,
252+
location=location,
226253
)
227254

228255
@staticmethod
@@ -481,7 +508,12 @@ def sample_list_voices():
481508
rpc = self._transport._wrapped_methods[self._transport.list_voices]
482509

483510
# Send the request.
484-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
511+
response = rpc(
512+
request,
513+
retry=retry,
514+
timeout=timeout,
515+
metadata=metadata,
516+
)
485517

486518
# Done; return the response.
487519
return response
@@ -598,7 +630,12 @@ def sample_synthesize_speech():
598630
rpc = self._transport._wrapped_methods[self._transport.synthesize_speech]
599631

600632
# Send the request.
601-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
633+
response = rpc(
634+
request,
635+
retry=retry,
636+
timeout=timeout,
637+
metadata=metadata,
638+
)
602639

603640
# Done; return the response.
604641
return response

packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech/transports/base.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,19 +121,23 @@ def _prep_wrapped_messages(self, client_info):
121121
# Precompute the wrapped methods.
122122
self._wrapped_methods = {
123123
self.list_voices: gapic_v1.method.wrap_method(
124-
self.list_voices, default_timeout=None, client_info=client_info,
124+
self.list_voices,
125+
default_timeout=None,
126+
client_info=client_info,
125127
),
126128
self.synthesize_speech: gapic_v1.method.wrap_method(
127-
self.synthesize_speech, default_timeout=None, client_info=client_info,
129+
self.synthesize_speech,
130+
default_timeout=None,
131+
client_info=client_info,
128132
),
129133
}
130134

131135
def close(self):
132136
"""Closes resources associated with the transport.
133137
134-
.. warning::
135-
Only call this method if the transport is NOT shared
136-
with other clients - this may cause errors in other clients!
138+
.. warning::
139+
Only call this method if the transport is NOT shared
140+
with other clients - this may cause errors in other clients!
137141
"""
138142
raise NotImplementedError()
139143

packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech/transports/grpc.py

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

225225
@property
226226
def grpc_channel(self) -> grpc.Channel:
227-
"""Return the channel designed to connect to this service.
228-
"""
227+
"""Return the channel designed to connect to this service."""
229228
return self._grpc_channel
230229

231230
@property

0 commit comments

Comments
 (0)
0