Skip to content

Commit

Permalink
chore(python): use black==22.3.0 (#211)
Browse files Browse the repository at this point in the history
Source-Link: googleapis/synthtool@6fab84a
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:7cffbc10910c3ab1b852c05114a08d374c195a81cdec1d4a67a1d129331d0bfe
  • Loading branch information
gcf-owl-bot[bot] authored Mar 29, 2022
1 parent 6c64bf6 commit 7f2286a
Show file tree
Hide file tree
Showing 18 changed files with 2,137 additions and 564 deletions.
2 changes: 1 addition & 1 deletion packages/google-analytics-data/.github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
digest: sha256:4e1991042fe54b991db9ca17c8fb386e61b22fe4d1472a568bf0fcac85dcf5d3
digest: sha256:7cffbc10910c3ab1b852c05114a08d374c195a81cdec1d4a67a1d129331d0bfe
5 changes: 4 additions & 1 deletion packages/google-analytics-data/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,10 @@
intersphinx_mapping = {
"python": ("https://python.readthedocs.org/en/latest/", None),
"google-auth": ("https://googleapis.dev/python/google-auth/latest/", None),
"google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,),
"google.api_core": (
"https://googleapis.dev/python/google-api-core/latest/",
None,
),
"grpc": ("https://grpc.github.io/grpc/python/", None),
"proto-plus": ("https://proto-plus-python.readthedocs.io/en/latest/", None),
"protobuf": ("https://googleapis.dev/python/protobuf/latest/", None),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,12 @@ async def run_report(
)

# Send the request.
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
response = await rpc(
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

# Done; return the response.
return response
Expand Down Expand Up @@ -255,7 +260,12 @@ async def run_pivot_report(
)

# Send the request.
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
response = await rpc(
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

# Done; return the response.
return response
Expand Down Expand Up @@ -299,7 +309,12 @@ async def batch_run_reports(
)

# Send the request.
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
response = await rpc(
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

# Done; return the response.
return response
Expand Down Expand Up @@ -343,7 +358,12 @@ async def batch_run_pivot_reports(
)

# Send the request.
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
response = await rpc(
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

# Done; return the response.
return response
Expand Down Expand Up @@ -434,7 +454,12 @@ async def get_metadata(
)

# Send the request.
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
response = await rpc(
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

# Done; return the response.
return response
Expand Down Expand Up @@ -486,15 +511,22 @@ async def run_realtime_report(
)

# Send the request.
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
response = await rpc(
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

# Done; return the response.
return response


try:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
gapic_version=pkg_resources.get_distribution("google-analytics-data",).version,
gapic_version=pkg_resources.get_distribution(
"google-analytics-data",
).version,
)
except pkg_resources.DistributionNotFound:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ class AlphaAnalyticsDataClientMeta(type):
_transport_registry["grpc_asyncio"] = AlphaAnalyticsDataGrpcAsyncIOTransport

def get_transport_class(
cls, label: str = None,
cls,
label: str = None,
) -> Type[AlphaAnalyticsDataTransport]:
"""Returns an appropriate transport class.
Expand Down Expand Up @@ -158,9 +159,13 @@ def transport(self) -> AlphaAnalyticsDataTransport:
return self._transport

@staticmethod
def metadata_path(property: str,) -> str:
def metadata_path(
property: str,
) -> str:
"""Returns a fully-qualified metadata string."""
return "properties/{property}/metadata".format(property=property,)
return "properties/{property}/metadata".format(
property=property,
)

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

@staticmethod
def common_billing_account_path(billing_account: str,) -> str:
def common_billing_account_path(
billing_account: str,
) -> str:
"""Returns a fully-qualified billing_account string."""
return "billingAccounts/{billing_account}".format(
billing_account=billing_account,
Expand All @@ -182,9 +189,13 @@ def parse_common_billing_account_path(path: str) -> Dict[str, str]:
return m.groupdict() if m else {}

@staticmethod
def common_folder_path(folder: str,) -> str:
def common_folder_path(
folder: str,
) -> str:
"""Returns a fully-qualified folder string."""
return "folders/{folder}".format(folder=folder,)
return "folders/{folder}".format(
folder=folder,
)

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

@staticmethod
def common_organization_path(organization: str,) -> str:
def common_organization_path(
organization: str,
) -> str:
"""Returns a fully-qualified organization string."""
return "organizations/{organization}".format(organization=organization,)
return "organizations/{organization}".format(
organization=organization,
)

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

@staticmethod
def common_project_path(project: str,) -> str:
def common_project_path(
project: str,
) -> str:
"""Returns a fully-qualified project string."""
return "projects/{project}".format(project=project,)
return "projects/{project}".format(
project=project,
)

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

@staticmethod
def common_location_path(project: str, location: str,) -> str:
def common_location_path(
project: str,
location: str,
) -> str:
"""Returns a fully-qualified location string."""
return "projects/{project}/locations/{location}".format(
project=project, location=location,
project=project,
location=location,
)

@staticmethod
Expand Down Expand Up @@ -393,7 +416,12 @@ def run_report(
rpc = self._transport._wrapped_methods[self._transport.run_report]

# Send the request.
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
response = rpc(
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

# Done; return the response.
return response
Expand Down Expand Up @@ -442,7 +470,12 @@ def run_pivot_report(
rpc = self._transport._wrapped_methods[self._transport.run_pivot_report]

# Send the request.
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
response = rpc(
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

# Done; return the response.
return response
Expand Down Expand Up @@ -487,7 +520,12 @@ def batch_run_reports(
rpc = self._transport._wrapped_methods[self._transport.batch_run_reports]

# Send the request.
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
response = rpc(
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

# Done; return the response.
return response
Expand Down Expand Up @@ -532,7 +570,12 @@ def batch_run_pivot_reports(
rpc = self._transport._wrapped_methods[self._transport.batch_run_pivot_reports]

# Send the request.
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
response = rpc(
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

# Done; return the response.
return response
Expand Down Expand Up @@ -623,7 +666,12 @@ def get_metadata(
)

# Send the request.
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
response = rpc(
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

# Done; return the response.
return response
Expand Down Expand Up @@ -676,15 +724,22 @@ def run_realtime_report(
)

# Send the request.
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
response = rpc(
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

# Done; return the response.
return response


try:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
gapic_version=pkg_resources.get_distribution("google-analytics-data",).version,
gapic_version=pkg_resources.get_distribution(
"google-analytics-data",
).version,
)
except pkg_resources.DistributionNotFound:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@

try:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
gapic_version=pkg_resources.get_distribution("google-analytics-data",).version,
gapic_version=pkg_resources.get_distribution(
"google-analytics-data",
).version,
)
except pkg_resources.DistributionNotFound:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()
Expand Down Expand Up @@ -156,24 +158,34 @@ def _prep_wrapped_messages(self, client_info):
# Precompute the wrapped methods.
self._wrapped_methods = {
self.run_report: gapic_v1.method.wrap_method(
self.run_report, default_timeout=60.0, client_info=client_info,
self.run_report,
default_timeout=60.0,
client_info=client_info,
),
self.run_pivot_report: gapic_v1.method.wrap_method(
self.run_pivot_report, default_timeout=60.0, client_info=client_info,
self.run_pivot_report,
default_timeout=60.0,
client_info=client_info,
),
self.batch_run_reports: gapic_v1.method.wrap_method(
self.batch_run_reports, default_timeout=60.0, client_info=client_info,
self.batch_run_reports,
default_timeout=60.0,
client_info=client_info,
),
self.batch_run_pivot_reports: gapic_v1.method.wrap_method(
self.batch_run_pivot_reports,
default_timeout=60.0,
client_info=client_info,
),
self.get_metadata: gapic_v1.method.wrap_method(
self.get_metadata, default_timeout=None, client_info=client_info,
self.get_metadata,
default_timeout=None,
client_info=client_info,
),
self.run_realtime_report: gapic_v1.method.wrap_method(
self.run_realtime_report, default_timeout=None, client_info=client_info,
self.run_realtime_report,
default_timeout=None,
client_info=client_info,
),
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,7 @@ def create_channel(

@property
def grpc_channel(self) -> grpc.Channel:
"""Return the channel designed to connect to this service.
"""
"""Return the channel designed to connect to this service."""
return self._grpc_channel

@property
Expand Down
Loading

0 comments on commit 7f2286a

Please sign in to comment.