Skip to content

Commit 7f2286a

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

18 files changed

Lines changed: 2137 additions & 564 deletions

File tree

packages/google-analytics-data/.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

packages/google-analytics-data/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-analytics-data/google/analytics/data_v1alpha/services/alpha_analytics_data/async_client.py

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,12 @@ async def run_report(
207207
)
208208

209209
# Send the request.
210-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
210+
response = await rpc(
211+
request,
212+
retry=retry,
213+
timeout=timeout,
214+
metadata=metadata,
215+
)
211216

212217
# Done; return the response.
213218
return response
@@ -255,7 +260,12 @@ async def run_pivot_report(
255260
)
256261

257262
# Send the request.
258-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
263+
response = await rpc(
264+
request,
265+
retry=retry,
266+
timeout=timeout,
267+
metadata=metadata,
268+
)
259269

260270
# Done; return the response.
261271
return response
@@ -299,7 +309,12 @@ async def batch_run_reports(
299309
)
300310

301311
# Send the request.
302-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
312+
response = await rpc(
313+
request,
314+
retry=retry,
315+
timeout=timeout,
316+
metadata=metadata,
317+
)
303318

304319
# Done; return the response.
305320
return response
@@ -343,7 +358,12 @@ async def batch_run_pivot_reports(
343358
)
344359

345360
# Send the request.
346-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
361+
response = await rpc(
362+
request,
363+
retry=retry,
364+
timeout=timeout,
365+
metadata=metadata,
366+
)
347367

348368
# Done; return the response.
349369
return response
@@ -434,7 +454,12 @@ async def get_metadata(
434454
)
435455

436456
# Send the request.
437-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
457+
response = await rpc(
458+
request,
459+
retry=retry,
460+
timeout=timeout,
461+
metadata=metadata,
462+
)
438463

439464
# Done; return the response.
440465
return response
@@ -486,15 +511,22 @@ async def run_realtime_report(
486511
)
487512

488513
# Send the request.
489-
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
514+
response = await rpc(
515+
request,
516+
retry=retry,
517+
timeout=timeout,
518+
metadata=metadata,
519+
)
490520

491521
# Done; return the response.
492522
return response
493523

494524

495525
try:
496526
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
497-
gapic_version=pkg_resources.get_distribution("google-analytics-data",).version,
527+
gapic_version=pkg_resources.get_distribution(
528+
"google-analytics-data",
529+
).version,
498530
)
499531
except pkg_resources.DistributionNotFound:
500532
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()

packages/google-analytics-data/google/analytics/data_v1alpha/services/alpha_analytics_data/client.py

Lines changed: 74 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ class AlphaAnalyticsDataClientMeta(type):
5252
_transport_registry["grpc_asyncio"] = AlphaAnalyticsDataGrpcAsyncIOTransport
5353

5454
def get_transport_class(
55-
cls, label: str = None,
55+
cls,
56+
label: str = None,
5657
) -> Type[AlphaAnalyticsDataTransport]:
5758
"""Returns an appropriate transport class.
5859
@@ -158,9 +159,13 @@ def transport(self) -> AlphaAnalyticsDataTransport:
158159
return self._transport
159160

160161
@staticmethod
161-
def metadata_path(property: str,) -> str:
162+
def metadata_path(
163+
property: str,
164+
) -> str:
162165
"""Returns a fully-qualified metadata string."""
163-
return "properties/{property}/metadata".format(property=property,)
166+
return "properties/{property}/metadata".format(
167+
property=property,
168+
)
164169

165170
@staticmethod
166171
def parse_metadata_path(path: str) -> Dict[str, str]:
@@ -169,7 +174,9 @@ def parse_metadata_path(path: str) -> Dict[str, str]:
169174
return m.groupdict() if m else {}
170175

171176
@staticmethod
172-
def common_billing_account_path(billing_account: str,) -> str:
177+
def common_billing_account_path(
178+
billing_account: str,
179+
) -> str:
173180
"""Returns a fully-qualified billing_account string."""
174181
return "billingAccounts/{billing_account}".format(
175182
billing_account=billing_account,
@@ -182,9 +189,13 @@ def parse_common_billing_account_path(path: str) -> Dict[str, str]:
182189
return m.groupdict() if m else {}
183190

184191
@staticmethod
185-
def common_folder_path(folder: str,) -> str:
192+
def common_folder_path(
193+
folder: str,
194+
) -> str:
186195
"""Returns a fully-qualified folder string."""
187-
return "folders/{folder}".format(folder=folder,)
196+
return "folders/{folder}".format(
197+
folder=folder,
198+
)
188199

189200
@staticmethod
190201
def parse_common_folder_path(path: str) -> Dict[str, str]:
@@ -193,9 +204,13 @@ def parse_common_folder_path(path: str) -> Dict[str, str]:
193204
return m.groupdict() if m else {}
194205

195206
@staticmethod
196-
def common_organization_path(organization: str,) -> str:
207+
def common_organization_path(
208+
organization: str,
209+
) -> str:
197210
"""Returns a fully-qualified organization string."""
198-
return "organizations/{organization}".format(organization=organization,)
211+
return "organizations/{organization}".format(
212+
organization=organization,
213+
)
199214

200215
@staticmethod
201216
def parse_common_organization_path(path: str) -> Dict[str, str]:
@@ -204,9 +219,13 @@ def parse_common_organization_path(path: str) -> Dict[str, str]:
204219
return m.groupdict() if m else {}
205220

206221
@staticmethod
207-
def common_project_path(project: str,) -> str:
222+
def common_project_path(
223+
project: str,
224+
) -> str:
208225
"""Returns a fully-qualified project string."""
209-
return "projects/{project}".format(project=project,)
226+
return "projects/{project}".format(
227+
project=project,
228+
)
210229

211230
@staticmethod
212231
def parse_common_project_path(path: str) -> Dict[str, str]:
@@ -215,10 +234,14 @@ def parse_common_project_path(path: str) -> Dict[str, str]:
215234
return m.groupdict() if m else {}
216235

217236
@staticmethod
218-
def common_location_path(project: str, location: str,) -> str:
237+
def common_location_path(
238+
project: str,
239+
location: str,
240+
) -> str:
219241
"""Returns a fully-qualified location string."""
220242
return "projects/{project}/locations/{location}".format(
221-
project=project, location=location,
243+
project=project,
244+
location=location,
222245
)
223246

224247
@staticmethod
@@ -393,7 +416,12 @@ def run_report(
393416
rpc = self._transport._wrapped_methods[self._transport.run_report]
394417

395418
# Send the request.
396-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
419+
response = rpc(
420+
request,
421+
retry=retry,
422+
timeout=timeout,
423+
metadata=metadata,
424+
)
397425

398426
# Done; return the response.
399427
return response
@@ -442,7 +470,12 @@ def run_pivot_report(
442470
rpc = self._transport._wrapped_methods[self._transport.run_pivot_report]
443471

444472
# Send the request.
445-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
473+
response = rpc(
474+
request,
475+
retry=retry,
476+
timeout=timeout,
477+
metadata=metadata,
478+
)
446479

447480
# Done; return the response.
448481
return response
@@ -487,7 +520,12 @@ def batch_run_reports(
487520
rpc = self._transport._wrapped_methods[self._transport.batch_run_reports]
488521

489522
# Send the request.
490-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
523+
response = rpc(
524+
request,
525+
retry=retry,
526+
timeout=timeout,
527+
metadata=metadata,
528+
)
491529

492530
# Done; return the response.
493531
return response
@@ -532,7 +570,12 @@ def batch_run_pivot_reports(
532570
rpc = self._transport._wrapped_methods[self._transport.batch_run_pivot_reports]
533571

534572
# Send the request.
535-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
573+
response = rpc(
574+
request,
575+
retry=retry,
576+
timeout=timeout,
577+
metadata=metadata,
578+
)
536579

537580
# Done; return the response.
538581
return response
@@ -623,7 +666,12 @@ def get_metadata(
623666
)
624667

625668
# Send the request.
626-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
669+
response = rpc(
670+
request,
671+
retry=retry,
672+
timeout=timeout,
673+
metadata=metadata,
674+
)
627675

628676
# Done; return the response.
629677
return response
@@ -676,15 +724,22 @@ def run_realtime_report(
676724
)
677725

678726
# Send the request.
679-
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
727+
response = rpc(
728+
request,
729+
retry=retry,
730+
timeout=timeout,
731+
metadata=metadata,
732+
)
680733

681734
# Done; return the response.
682735
return response
683736

684737

685738
try:
686739
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
687-
gapic_version=pkg_resources.get_distribution("google-analytics-data",).version,
740+
gapic_version=pkg_resources.get_distribution(
741+
"google-analytics-data",
742+
).version,
688743
)
689744
except pkg_resources.DistributionNotFound:
690745
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()

packages/google-analytics-data/google/analytics/data_v1alpha/services/alpha_analytics_data/transports/base.py

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@
3030

3131
try:
3232
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
33-
gapic_version=pkg_resources.get_distribution("google-analytics-data",).version,
33+
gapic_version=pkg_resources.get_distribution(
34+
"google-analytics-data",
35+
).version,
3436
)
3537
except pkg_resources.DistributionNotFound:
3638
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()
@@ -156,24 +158,34 @@ def _prep_wrapped_messages(self, client_info):
156158
# Precompute the wrapped methods.
157159
self._wrapped_methods = {
158160
self.run_report: gapic_v1.method.wrap_method(
159-
self.run_report, default_timeout=60.0, client_info=client_info,
161+
self.run_report,
162+
default_timeout=60.0,
163+
client_info=client_info,
160164
),
161165
self.run_pivot_report: gapic_v1.method.wrap_method(
162-
self.run_pivot_report, default_timeout=60.0, client_info=client_info,
166+
self.run_pivot_report,
167+
default_timeout=60.0,
168+
client_info=client_info,
163169
),
164170
self.batch_run_reports: gapic_v1.method.wrap_method(
165-
self.batch_run_reports, default_timeout=60.0, client_info=client_info,
171+
self.batch_run_reports,
172+
default_timeout=60.0,
173+
client_info=client_info,
166174
),
167175
self.batch_run_pivot_reports: gapic_v1.method.wrap_method(
168176
self.batch_run_pivot_reports,
169177
default_timeout=60.0,
170178
client_info=client_info,
171179
),
172180
self.get_metadata: gapic_v1.method.wrap_method(
173-
self.get_metadata, default_timeout=None, client_info=client_info,
181+
self.get_metadata,
182+
default_timeout=None,
183+
client_info=client_info,
174184
),
175185
self.run_realtime_report: gapic_v1.method.wrap_method(
176-
self.run_realtime_report, default_timeout=None, client_info=client_info,
186+
self.run_realtime_report,
187+
default_timeout=None,
188+
client_info=client_info,
177189
),
178190
}
179191

packages/google-analytics-data/google/analytics/data_v1alpha/services/alpha_analytics_data/transports/grpc.py

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

222222
@property
223223
def grpc_channel(self) -> grpc.Channel:
224-
"""Return the channel designed to connect to this service.
225-
"""
224+
"""Return the channel designed to connect to this service."""
226225
return self._grpc_channel
227226

228227
@property

0 commit comments

Comments
 (0)