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

Commit b7ddc21

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

18 files changed

Lines changed: 824 additions & 242 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:4e1991042fe54b991db9ca17c8fb386e61b22fe4d1472a568bf0fcac85dcf5d3
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/dataqna_v1alpha/services/auto_suggestion_service/async_client.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,12 @@ def sample_suggest_queries():
335335
)
336336

337337
# Send the request.
338-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
338+
response = await rpc(
339+
request,
340+
retry=retry,
341+
timeout=timeout,
342+
metadata=metadata,
343+
)
339344

340345
# Done; return the response.
341346
return response
@@ -349,7 +354,9 @@ async def __aexit__(self, exc_type, exc, tb):
349354

350355
try:
351356
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
352-
gapic_version=pkg_resources.get_distribution("google-cloud-dataqna",).version,
357+
gapic_version=pkg_resources.get_distribution(
358+
"google-cloud-dataqna",
359+
).version,
353360
)
354361
except pkg_resources.DistributionNotFound:
355362
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()

google/cloud/dataqna_v1alpha/services/auto_suggestion_service/client.py

Lines changed: 38 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ class AutoSuggestionServiceClientMeta(type):
5555
_transport_registry["grpc_asyncio"] = AutoSuggestionServiceGrpcAsyncIOTransport
5656

5757
def get_transport_class(
58-
cls, label: str = None,
58+
cls,
59+
label: str = None,
5960
) -> Type[AutoSuggestionServiceTransport]:
6061
"""Returns an appropriate transport class.
6162
@@ -232,7 +233,9 @@ def transport(self) -> AutoSuggestionServiceTransport:
232233
return self._transport
233234

234235
@staticmethod
235-
def common_billing_account_path(billing_account: str,) -> str:
236+
def common_billing_account_path(
237+
billing_account: str,
238+
) -> str:
236239
"""Returns a fully-qualified billing_account string."""
237240
return "billingAccounts/{billing_account}".format(
238241
billing_account=billing_account,
@@ -245,9 +248,13 @@ def parse_common_billing_account_path(path: str) -> Dict[str, str]:
245248
return m.groupdict() if m else {}
246249

247250
@staticmethod
248-
def common_folder_path(folder: str,) -> str:
251+
def common_folder_path(
252+
folder: str,
253+
) -> str:
249254
"""Returns a fully-qualified folder string."""
250-
return "folders/{folder}".format(folder=folder,)
255+
return "folders/{folder}".format(
256+
folder=folder,
257+
)
251258

252259
@staticmethod
253260
def parse_common_folder_path(path: str) -> Dict[str, str]:
@@ -256,9 +263,13 @@ def parse_common_folder_path(path: str) -> Dict[str, str]:
256263
return m.groupdict() if m else {}
257264

258265
@staticmethod
259-
def common_organization_path(organization: str,) -> str:
266+
def common_organization_path(
267+
organization: str,
268+
) -> str:
260269
"""Returns a fully-qualified organization string."""
261-
return "organizations/{organization}".format(organization=organization,)
270+
return "organizations/{organization}".format(
271+
organization=organization,
272+
)
262273

263274
@staticmethod
264275
def parse_common_organization_path(path: str) -> Dict[str, str]:
@@ -267,9 +278,13 @@ def parse_common_organization_path(path: str) -> Dict[str, str]:
267278
return m.groupdict() if m else {}
268279

269280
@staticmethod
270-
def common_project_path(project: str,) -> str:
281+
def common_project_path(
282+
project: str,
283+
) -> str:
271284
"""Returns a fully-qualified project string."""
272-
return "projects/{project}".format(project=project,)
285+
return "projects/{project}".format(
286+
project=project,
287+
)
273288

274289
@staticmethod
275290
def parse_common_project_path(path: str) -> Dict[str, str]:
@@ -278,10 +293,14 @@ def parse_common_project_path(path: str) -> Dict[str, str]:
278293
return m.groupdict() if m else {}
279294

280295
@staticmethod
281-
def common_location_path(project: str, location: str,) -> str:
296+
def common_location_path(
297+
project: str,
298+
location: str,
299+
) -> str:
282300
"""Returns a fully-qualified location string."""
283301
return "projects/{project}/locations/{location}".format(
284-
project=project, location=location,
302+
project=project,
303+
location=location,
285304
)
286305

287306
@staticmethod
@@ -518,7 +537,12 @@ def sample_suggest_queries():
518537
)
519538

520539
# Send the request.
521-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
540+
response = rpc(
541+
request,
542+
retry=retry,
543+
timeout=timeout,
544+
metadata=metadata,
545+
)
522546

523547
# Done; return the response.
524548
return response
@@ -539,7 +563,9 @@ def __exit__(self, type, value, traceback):
539563

540564
try:
541565
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
542-
gapic_version=pkg_resources.get_distribution("google-cloud-dataqna",).version,
566+
gapic_version=pkg_resources.get_distribution(
567+
"google-cloud-dataqna",
568+
).version,
543569
)
544570
except pkg_resources.DistributionNotFound:
545571
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()

google/cloud/dataqna_v1alpha/services/auto_suggestion_service/transports/base.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929

3030
try:
3131
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
32-
gapic_version=pkg_resources.get_distribution("google-cloud-dataqna",).version,
32+
gapic_version=pkg_resources.get_distribution(
33+
"google-cloud-dataqna",
34+
).version,
3335
)
3436
except pkg_resources.DistributionNotFound:
3537
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()
@@ -119,16 +121,18 @@ def _prep_wrapped_messages(self, client_info):
119121
# Precompute the wrapped methods.
120122
self._wrapped_methods = {
121123
self.suggest_queries: gapic_v1.method.wrap_method(
122-
self.suggest_queries, default_timeout=None, client_info=client_info,
124+
self.suggest_queries,
125+
default_timeout=None,
126+
client_info=client_info,
123127
),
124128
}
125129

126130
def close(self):
127131
"""Closes resources associated with the transport.
128132
129-
.. warning::
130-
Only call this method if the transport is NOT shared
131-
with other clients - this may cause errors in other clients!
133+
.. warning::
134+
Only call this method if the transport is NOT shared
135+
with other clients - this may cause errors in other clients!
132136
"""
133137
raise NotImplementedError()
134138

google/cloud/dataqna_v1alpha/services/auto_suggestion_service/transports/grpc.py

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

295295
@property
296296
def grpc_channel(self) -> grpc.Channel:
297-
"""Return the channel designed to connect to this service.
298-
"""
297+
"""Return the channel designed to connect to this service."""
299298
return self._grpc_channel
300299

301300
@property

google/cloud/dataqna_v1alpha/services/question_service/async_client.py

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,12 @@ def sample_get_question():
317317
)
318318

319319
# Send the request.
320-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
320+
response = await rpc(
321+
request,
322+
retry=retry,
323+
timeout=timeout,
324+
metadata=metadata,
325+
)
321326

322327
# Done; return the response.
323328
return response
@@ -424,7 +429,12 @@ def sample_create_question():
424429
)
425430

426431
# Send the request.
427-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
432+
response = await rpc(
433+
request,
434+
retry=retry,
435+
timeout=timeout,
436+
metadata=metadata,
437+
)
428438

429439
# Done; return the response.
430440
return response
@@ -528,7 +538,12 @@ def sample_execute_question():
528538
)
529539

530540
# Send the request.
531-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
541+
response = await rpc(
542+
request,
543+
retry=retry,
544+
timeout=timeout,
545+
metadata=metadata,
546+
)
532547

533548
# Done; return the response.
534549
return response
@@ -617,7 +632,12 @@ def sample_get_user_feedback():
617632
)
618633

619634
# Send the request.
620-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
635+
response = await rpc(
636+
request,
637+
retry=retry,
638+
timeout=timeout,
639+
metadata=metadata,
640+
)
621641

622642
# Done; return the response.
623643
return response
@@ -723,7 +743,12 @@ def sample_update_user_feedback():
723743
)
724744

725745
# Send the request.
726-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
746+
response = await rpc(
747+
request,
748+
retry=retry,
749+
timeout=timeout,
750+
metadata=metadata,
751+
)
727752

728753
# Done; return the response.
729754
return response
@@ -737,7 +762,9 @@ async def __aexit__(self, exc_type, exc, tb):
737762

738763
try:
739764
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
740-
gapic_version=pkg_resources.get_distribution("google-cloud-dataqna",).version,
765+
gapic_version=pkg_resources.get_distribution(
766+
"google-cloud-dataqna",
767+
).version,
741768
)
742769
except pkg_resources.DistributionNotFound:
743770
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()

0 commit comments

Comments
 (0)