Skip to content

build: fix mypy issues #801

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions google/api_core/retry/retry_streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ def retry_target_stream(
[List[Exception], RetryFailureReason, Optional[float]],
Tuple[Exception, Optional[Exception]],
] = build_retry_error,
init_args: _P.args = (),
init_kwargs: _P.kwargs = {},
init_args: tuple = (),
init_kwargs: dict = {},
**kwargs,
) -> Generator[_Y, Any, None]:
"""Create a generator wrapper that retries the wrapped stream if it fails.
Expand Down
4 changes: 2 additions & 2 deletions google/api_core/retry/retry_streaming_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ async def retry_target_stream(
[list[Exception], RetryFailureReason, float | None],
tuple[Exception, Exception | None],
] = build_retry_error,
init_args: _P.args = (),
init_kwargs: _P.kwargs = {},
init_args: tuple = (),
init_kwargs: dict = {},
**kwargs,
) -> AsyncGenerator[_Y, None]:
"""Create a generator wrapper that retries the wrapped stream if it fails.
Expand Down
4 changes: 1 addition & 3 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,7 @@ def pytype(session):
@nox.session(python=DEFAULT_PYTHON_VERSION)
def mypy(session):
"""Run type-checking."""
# TODO(https://github.com/googleapis/python-api-core/issues/799):
# Remove mypy constraint. We should use the latest version of mypy.
session.install(".[grpc,async_rest]", "mypy<1.15.0")
session.install(".[grpc,async_rest]", "mypy")
session.install(
"types-setuptools",
"types-requests",
Expand Down