diff --git a/google/api_core/retry/retry_streaming.py b/google/api_core/retry/retry_streaming.py index e113323b..00666841 100644 --- a/google/api_core/retry/retry_streaming.py +++ b/google/api_core/retry/retry_streaming.py @@ -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. diff --git a/google/api_core/retry/retry_streaming_async.py b/google/api_core/retry/retry_streaming_async.py index 2924ba14..942abf5f 100644 --- a/google/api_core/retry/retry_streaming_async.py +++ b/google/api_core/retry/retry_streaming_async.py @@ -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. diff --git a/noxfile.py b/noxfile.py index c318c49f..ac21330e 100644 --- a/noxfile.py +++ b/noxfile.py @@ -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",