Commit ca15a7e
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 ca15a7eCopy 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
- packages/google-cloud-monitoring-dashboards/google/monitoring/dashboard_v1
- services/dashboards_service
- transports
- types
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 number | Diff line number | Diff line change |
|---|---|---|
| ||
18 | 18 | |
19 | 19 | |
20 | 20 | |
21 | | - |
| 21 | + |
22 | 22 | |
23 | 23 | |
24 | 24 | |
25 | 25 | |
26 | | - |
| 26 | + |
27 | 27 | |
28 | 28 | |
29 | 29 | |
| ||
36 | 36 | |
37 | 37 | |
38 | 38 | |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
39 | 45 | |
40 | 46 | |
41 | 47 | |
| ||
51 | 57 | |
52 | 58 | |
53 | 59 | |
54 | | - |
55 | | - |
56 | | - |
| 60 | + |
57 | 61 | |
58 | 62 | |
59 | 63 | |
60 | 64 | |
61 | | - |
62 | | - |
63 | | - |
| 65 | + |
| 66 | + |
| 67 | + |
64 | 68 | |
65 | 69 | |
66 | 70 | |
| ||
70 | 74 | |
71 | 75 | |
72 | 76 | |
73 | | - |
| 77 | + |
74 | 78 | |
75 | 79 | |
76 | | - |
| 80 | + |
77 | 81 | |
78 | 82 | |
79 | 83 | |
| ||
100 | 104 | |
101 | 105 | |
102 | 106 | |
103 | | - |
| 107 | + |
104 | 108 | |
105 | | - |
106 | | - |
| 109 | + |
| 110 | + |
107 | 111 | |
108 | 112 | |
109 | 113 | |
| ||
116 | 120 | |
117 | 121 | |
118 | 122 | |
119 | | - |
| 123 | + |
120 | 124 | |
121 | | - |
| 125 | + |
122 | 126 | |
123 | 127 | |
124 | 128 | |
| ||
161 | 165 | |
162 | 166 | |
163 | 167 | |
164 | | - |
| 168 | + |
165 | 169 | |
166 | | - |
167 | | - |
| 170 | + |
| 171 | + |
168 | 172 | |
169 | 173 | |
170 | 174 | |
| ||
177 | 181 | |
178 | 182 | |
179 | 183 | |
180 | | - |
| 184 | + |
181 | 185 | |
182 | | - |
| 186 | + |
183 | 187 | |
184 | 188 | |
185 | 189 | |
| ||
231 | 235 | |
232 | 236 | |
233 | 237 | |
234 | | - |
| 238 | + |
235 | 239 | |
236 | | - |
237 | | - |
| 240 | + |
| 241 | + |
238 | 242 | |
239 | 243 | |
240 | 244 | |
| ||
247 | 251 | |
248 | 252 | |
249 | 253 | |
250 | | - |
| 254 | + |
251 | 255 | |
252 | | - |
| 256 | + |
253 | 257 | |
254 | 258 | |
255 | 259 | |
| ||
292 | 296 | |
293 | 297 | |
294 | 298 | |
295 | | - |
| 299 | + |
296 | 300 | |
297 | | - |
298 | | - |
| 301 | + |
| 302 | + |
299 | 303 | |
300 | 304 | |
301 | 305 | |
| ||
308 | 312 | |
309 | 313 | |
310 | 314 | |
311 | | - |
| 315 | + |
312 | 316 | |
313 | | - |
| 317 | + |
314 | 318 | |
315 | 319 | |
316 | 320 | |
| ||
342 | 346 | |
343 | 347 | |
344 | 348 | |
345 | | - |
| 349 | + |
346 | 350 | |
347 | | - |
348 | | - |
| 351 | + |
| 352 | + |
349 | 353 | |
350 | 354 | |
351 | 355 | |
| ||
358 | 362 | |
359 | 363 | |
360 | 364 | |
361 | | - |
| 365 | + |
362 | 366 | |
363 | | - |
| 367 | + |
364 | 368 | |
365 | 369 | |
366 | 370 | |
|
0 commit comments