Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ca15a7e

Browse filesBrowse files
authored
fix: fix mypy errors in google-cloud-monitoring-dashboards/google/monitoring (#15493)
Towards #15104 This is needed to unblock #15457 . See the following mypy failure for `google-cloud-monitoring-dashboards` See follow up issue #11858 to remove the `google/monitoring` folder which is no longer being generated automatically. See follow up issue googleapis/proto-plus-python#558 for the `prerelease` presubmit failure. ``` .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/types/service.py:19: error: Name "proto" is not defined [name-defined] .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/types/drilldowns.py:19: error: Name "proto" is not defined [name-defined] .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/base.py:49: error: Incompatible default for argument "credentials" (default has type "None", argument has type "Credentials") [assignment] .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/base.py:49: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/base.py:49: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc.py:52: error: Incompatible default for argument "credentials" (default has type "None", argument has type "Credentials") [assignment] .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc.py:52: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc.py:52: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc.py:53: error: Incompatible default for argument "credentials_file" (default has type "None", argument has type "str") [assignment] .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc.py:53: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc.py:53: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc.py:54: error: Incompatible default for argument "scopes" (default has type "None", argument has type "Sequence[str]") [assignment] .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc.py:54: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc.py:54: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc.py:56: error: Incompatible default for argument "api_mtls_endpoint" (default has type "None", argument has type "str") [assignment] .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc.py:56: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc.py:56: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc.py:57: error: Incompatible default for argument "client_cert_source" (default has type "None", argument has type "Callable[[], tuple[bytes, bytes]]") [assignment] .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc.py:57: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc.py:57: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc.py:97: error: Incompatible types in assignment (expression has type "bool", variable has type "Credentials") [assignment] .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc.py:115: error: Function "client_cert_source" could always be true in boolean context [truthy-function] .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc.py:148: error: Incompatible default for argument "credentials" (default has type "None", argument has type "Credentials") [assignment] .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc.py:148: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc.py:148: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc.py:149: error: Incompatible default for argument "credentials_file" (default has type "None", argument has type "str") [assignment] .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc.py:149: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc.py:149: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc_asyncio.py:54: error: Incompatible default for argument "credentials" (default has type "None", argument has type "Credentials") [assignment] .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc_asyncio.py:54: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc_asyncio.py:54: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc_asyncio.py:95: error: Incompatible default for argument "credentials" (default has type "None", argument has type "Credentials") [assignment] .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc_asyncio.py:95: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc_asyncio.py:95: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc_asyncio.py:99: error: Incompatible default for argument "api_mtls_endpoint" (default has type "None", argument has type "str") [assignment] .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc_asyncio.py:99: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc_asyncio.py:99: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/client.py:474: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:55: error: Argument 1 to "get_transport_class" of "DashboardsServiceClientMeta" has incompatible type "type[type[DashboardsServiceClient]]"; expected "DashboardsServiceClientMeta" [arg-type] .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:61: error: Incompatible default for argument "credentials" (default has type "None", argument has type "Credentials") [assignment] .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:61: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:61: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:63: error: Module "google.api_core.client_options" is not valid as a type [valid-type] .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:63: note: Perhaps you meant to use a protocol matching the module structure? .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:103: error: Incompatible default for argument "request" (default has type "None", argument has type "CreateDashboardRequest") [assignment] .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:103: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:103: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:105: error: Incompatible default for argument "retry" (default has type "_MethodDefault", argument has type "Retry") [assignment] .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:106: error: Incompatible default for argument "timeout" (default has type "None", argument has type "float") [assignment] .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:106: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:106: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:164: error: Incompatible default for argument "request" (default has type "None", argument has type "ListDashboardsRequest") [assignment] .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:164: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:164: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:166: error: Incompatible default for argument "retry" (default has type "_MethodDefault", argument has type "Retry") [assignment] .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:167: error: Incompatible default for argument "timeout" (default has type "None", argument has type "float") [assignment] .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:167: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:167: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:234: error: Incompatible default for argument "request" (default has type "None", argument has type "GetDashboardRequest") [assignment] .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:234: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:234: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:236: error: Incompatible default for argument "retry" (default has type "_MethodDefault", argument has type "Retry") [assignment] .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:237: error: Incompatible default for argument "timeout" (default has type "None", argument has type "float") [assignment] .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:237: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:237: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:295: error: Incompatible default for argument "request" (default has type "None", argument has type "DeleteDashboardRequest") [assignment] .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:295: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:295: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:297: error: Incompatible default for argument "retry" (default has type "_MethodDefault", argument has type "Retry") [assignment] .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:298: error: Incompatible default for argument "timeout" (default has type "None", argument has type "float") [assignment] .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:298: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:298: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:345: error: Incompatible default for argument "request" (default has type "None", argument has type "UpdateDashboardRequest") [assignment] .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:345: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:345: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:347: error: Incompatible default for argument "retry" (default has type "_MethodDefault", argument has type "Retry") [assignment] .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:348: error: Incompatible default for argument "timeout" (default has type "None", argument has type "float") [assignment] .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:348: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True .nox/mypy-3-14/lib/python3.14/site-packages/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py:348: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase ```
1 parent 0d24b06 commit ca15a7e
Copy full SHA for ca15a7e

7 files changed

+102-142Lines changed: 102 additions & 142 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/google-cloud-monitoring-dashboards/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py‎

Copy file name to clipboardExpand all lines: packages/google-cloud-monitoring-dashboards/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py
+39-35Lines changed: 39 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
from collections import OrderedDict
1919
import functools
2020
import re
21-
from typing import Dict, Sequence, Tuple, Type, Union
21+
from typing import Dict, Optional, Sequence, Tuple, Type, Union
2222

2323
from google.api_core import exceptions # type: ignore
2424
from google.api_core import gapic_v1 # type: ignore
2525
from google.api_core import retry as retries # type: ignore
26-
import google.api_core.client_options as ClientOptions # type: ignore
26+
from google.api_core.client_options import ClientOptions # type: ignore
2727
from google.auth import credentials # type: ignore
2828
from google.oauth2 import service_account # type: ignore
2929

@@ -36,6 +36,12 @@
3636
from .transports.grpc_asyncio import DashboardsServiceGrpcAsyncIOTransport
3737

3838

39+
try:
40+
OptionalRetry = Union[retries.AsyncRetry, gapic_v1.method._MethodDefault, None]
41+
except AttributeError: # pragma: NO COVER
42+
OptionalRetry = Union[retries.AsyncRetry, object, None] # type: ignore
43+
44+
3945
class DashboardsServiceAsyncClient:
4046
"""Manages Stackdriver dashboards. A dashboard is an arrangement
4147
of data display widgets in a specific layout.
@@ -51,16 +57,14 @@ class DashboardsServiceAsyncClient:
5157
from_service_account_file = DashboardsServiceClient.from_service_account_file
5258
from_service_account_json = from_service_account_file
5359

54-
get_transport_class = functools.partial(
55-
type(DashboardsServiceClient).get_transport_class, type(DashboardsServiceClient)
56-
)
60+
get_transport_class = DashboardsServiceClient.get_transport_class
5761

5862
def __init__(
5963
self,
6064
*,
61-
credentials: credentials.Credentials = None,
62-
transport: Union[str, DashboardsServiceTransport] = "grpc_asyncio",
63-
client_options: ClientOptions = None,
65+
credentials: Optional[credentials.Credentials] = None,
66+
transport: Union[str, DashboardsServiceTransport, None] = "grpc_asyncio",
67+
client_options: Optional[ClientOptions] = None,
6468
) -> None:
6569
"""Instantiate the dashboards service client.
6670
@@ -70,10 +74,10 @@ def __init__(
7074
credentials identify the application to the service; if none
7175
are specified, the client will attempt to ascertain the
7276
credentials from the environment.
73-
transport (Union[str, ~.DashboardsServiceTransport]): The
77+
transport (Union[str, ~.DashboardsServiceTransport, None]): The
7478
transport to use. If set to None, a transport is chosen
7579
automatically.
76-
client_options (ClientOptions): Custom options for the client. It
80+
client_options (Optional[ClientOptions]): Custom options for the client. It
7781
won't take effect if a ``transport`` instance is provided.
7882
(1) The ``api_endpoint`` property can be used to override the
7983
default endpoint provided by the client. GOOGLE_API_USE_MTLS
@@ -100,10 +104,10 @@ def __init__(
100104

101105
async def create_dashboard(
102106
self,
103-
request: dashboards_service.CreateDashboardRequest = None,
107+
request: Optional[dashboards_service.CreateDashboardRequest] = None,
104108
*,
105-
retry: retries.Retry = gapic_v1.method.DEFAULT,
106-
timeout: float = None,
109+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
110+
timeout: Optional[float] = None,
107111
metadata: Sequence[Tuple[str, str]] = (),
108112
) -> dashboard.Dashboard:
109113
r"""Creates a new custom dashboard.
@@ -116,9 +120,9 @@ async def create_dashboard(
116120
request (:class:`~.dashboards_service.CreateDashboardRequest`):
117121
The request object. The `CreateDashboard` request.
118122
119-
retry (google.api_core.retry.Retry): Designation of what errors, if any,
123+
retry (OptionalRetry): Designation of what errors, if any,
120124
should be retried.
121-
timeout (float): The timeout for this request.
125+
timeout (Optional[float]): The timeout for this request.
122126
metadata (Sequence[Tuple[str, str]]): Strings which should be
123127
sent along with the request as metadata.
124128
@@ -161,10 +165,10 @@ async def create_dashboard(
161165

162166
async def list_dashboards(
163167
self,
164-
request: dashboards_service.ListDashboardsRequest = None,
168+
request: Optional[dashboards_service.ListDashboardsRequest] = None,
165169
*,
166-
retry: retries.Retry = gapic_v1.method.DEFAULT,
167-
timeout: float = None,
170+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
171+
timeout: Optional[float] = None,
168172
metadata: Sequence[Tuple[str, str]] = (),
169173
) -> pagers.ListDashboardsAsyncPager:
170174
r"""Lists the existing dashboards.
@@ -177,9 +181,9 @@ async def list_dashboards(
177181
request (:class:`~.dashboards_service.ListDashboardsRequest`):
178182
The request object. The `ListDashboards` request.
179183
180-
retry (google.api_core.retry.Retry): Designation of what errors, if any,
184+
retry (OptionalRetry): Designation of what errors, if any,
181185
should be retried.
182-
timeout (float): The timeout for this request.
186+
timeout (Optional[float]): The timeout for this request.
183187
metadata (Sequence[Tuple[str, str]]): Strings which should be
184188
sent along with the request as metadata.
185189
@@ -231,10 +235,10 @@ async def list_dashboards(
231235

232236
async def get_dashboard(
233237
self,
234-
request: dashboards_service.GetDashboardRequest = None,
238+
request: Optional[dashboards_service.GetDashboardRequest] = None,
235239
*,
236-
retry: retries.Retry = gapic_v1.method.DEFAULT,
237-
timeout: float = None,
240+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
241+
timeout: Optional[float] = None,
238242
metadata: Sequence[Tuple[str, str]] = (),
239243
) -> dashboard.Dashboard:
240244
r"""Fetches a specific dashboard.
@@ -247,9 +251,9 @@ async def get_dashboard(
247251
request (:class:`~.dashboards_service.GetDashboardRequest`):
248252
The request object. The `GetDashboard` request.
249253
250-
retry (google.api_core.retry.Retry): Designation of what errors, if any,
254+
retry (OptionalRetry): Designation of what errors, if any,
251255
should be retried.
252-
timeout (float): The timeout for this request.
256+
timeout (Optional[float]): The timeout for this request.
253257
metadata (Sequence[Tuple[str, str]]): Strings which should be
254258
sent along with the request as metadata.
255259
@@ -292,10 +296,10 @@ async def get_dashboard(
292296

293297
async def delete_dashboard(
294298
self,
295-
request: dashboards_service.DeleteDashboardRequest = None,
299+
request: Optional[dashboards_service.DeleteDashboardRequest] = None,
296300
*,
297-
retry: retries.Retry = gapic_v1.method.DEFAULT,
298-
timeout: float = None,
301+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
302+
timeout: Optional[float] = None,
299303
metadata: Sequence[Tuple[str, str]] = (),
300304
) -> None:
301305
r"""Deletes an existing custom dashboard.
@@ -308,9 +312,9 @@ async def delete_dashboard(
308312
request (:class:`~.dashboards_service.DeleteDashboardRequest`):
309313
The request object. The `DeleteDashboard` request.
310314
311-
retry (google.api_core.retry.Retry): Designation of what errors, if any,
315+
retry (OptionalRetry): Designation of what errors, if any,
312316
should be retried.
313-
timeout (float): The timeout for this request.
317+
timeout (Optional[float]): The timeout for this request.
314318
metadata (Sequence[Tuple[str, str]]): Strings which should be
315319
sent along with the request as metadata.
316320
"""
@@ -342,10 +346,10 @@ async def delete_dashboard(
342346

343347
async def update_dashboard(
344348
self,
345-
request: dashboards_service.UpdateDashboardRequest = None,
349+
request: Optional[dashboards_service.UpdateDashboardRequest] = None,
346350
*,
347-
retry: retries.Retry = gapic_v1.method.DEFAULT,
348-
timeout: float = None,
351+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
352+
timeout: Optional[float] = None,
349353
metadata: Sequence[Tuple[str, str]] = (),
350354
) -> dashboard.Dashboard:
351355
r"""Replaces an existing custom dashboard with a new definition.
@@ -358,9 +362,9 @@ async def update_dashboard(
358362
request (:class:`~.dashboards_service.UpdateDashboardRequest`):
359363
The request object. The `UpdateDashboard` request.
360364
361-
retry (google.api_core.retry.Retry): Designation of what errors, if any,
365+
retry (OptionalRetry): Designation of what errors, if any,
362366
should be retried.
363-
timeout (float): The timeout for this request.
367+
timeout (Optional[float]): The timeout for this request.
364368
metadata (Sequence[Tuple[str, str]]): Strings which should be
365369
sent along with the request as metadata.
366370

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.