Skip to content

Commit 4daf9cc

Browse files
authored
fix: fix mypy (#15496)
Towards #15104 This is needed to unblock #15457 . See follow up issue googleapis/proto-plus-python#558 for the `prerelease` presubmit failure. See the following mypy failure for `grafeas` ``` 2026-01-16T22:02:28.7158467Z grafeas/grafeas_v1/services/grafeas/client.py:362: error: Incompatible default for argument "transport" (default has type "None", argument has type "str | GrafeasTransport") ```
1 parent 1f4c286 commit 4daf9cc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.librarian/generator-input/client-post-processing/unique-grafeas-client.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1957,13 +1957,13 @@ replacements:
19571957
def __init__(
19581958
self,
19591959
*,
1960-
transport: Union[str, GrafeasTransport] = None,
1960+
transport: Optional[Union[str, GrafeasTransport]] = None,
19611961
credentials: Optional[ga_credentials.Credentials] = None,
19621962
) -> None:
19631963
"""Instantiate the grafeas client.
19641964
19651965
Args:
1966-
transport (Union[str, ~.GrafeasTransport]): The
1966+
transport (Optional[Union[str, ~.GrafeasTransport]]): The
19671967
transport to use.
19681968
credentials (Optional[google.auth.credentials.Credentials]): The
19691969
authorization credentials to attach to requests. These

packages/grafeas/grafeas/grafeas_v1/services/grafeas/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,13 +359,13 @@ def parse_common_location_path(path: str) -> Dict[str, str]:
359359
def __init__(
360360
self,
361361
*,
362-
transport: Union[str, GrafeasTransport] = None,
362+
transport: Optional[Union[str, GrafeasTransport]] = None,
363363
credentials: Optional[ga_credentials.Credentials] = None,
364364
) -> None:
365365
"""Instantiate the grafeas client.
366366
367367
Args:
368-
transport (Union[str, ~.GrafeasTransport]): The
368+
transport (Optional[Union[str, ~.GrafeasTransport]]): The
369369
transport to use.
370370
credentials (Optional[google.auth.credentials.Credentials]): The
371371
authorization credentials to attach to requests. These

0 commit comments

Comments
 (0)