From cdf5cc34f285eddf857299fb27fa170980a06dba Mon Sep 17 00:00:00 2001 From: Huazuo Gao Date: Tue, 6 Dec 2022 04:00:32 +0800 Subject: [PATCH] types: fix signature of coroutine (#9333) --- stdlib/types.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/types.pyi b/stdlib/types.pyi index 4047cf845..a40b6280f 100644 --- a/stdlib/types.pyi +++ b/stdlib/types.pyi @@ -569,7 +569,7 @@ _P = ParamSpec("_P") # it's not really an Awaitable, but can be used in an await expression. Real type: Generator & Awaitable # The type: ignore is due to overlapping overloads, not the use of ParamSpec @overload -def coroutine(func: Callable[_P, Generator[_R, Any, Any]]) -> Callable[_P, Awaitable[_R]]: ... # type: ignore[misc] +def coroutine(func: Callable[_P, Generator[Any, Any, _R]]) -> Callable[_P, Awaitable[_R]]: ... # type: ignore[misc] @overload def coroutine(func: _Fn) -> _Fn: ...