@@ -6,6 +6,7 @@ from typing import (
6
6
AsyncGenerator ,
7
7
Awaitable ,
8
8
Callable ,
9
+ Coroutine ,
9
10
Generator ,
10
11
Generic ,
11
12
ItemsView ,
@@ -211,20 +212,20 @@ class AsyncGeneratorType(AsyncGenerator[_T_co, _T_contra]):
211
212
def aclose (self ) -> Awaitable [None ]: ...
212
213
213
214
@final
214
- class CoroutineType :
215
+ class CoroutineType ( Coroutine [ _T_co , _T_contra , _V_co ]) :
215
216
__name__ : str
216
217
__qualname__ : str
217
218
cr_await : Any | None
218
219
cr_code : CodeType
219
220
cr_frame : FrameType
220
221
cr_running : bool
221
222
def close (self ) -> None : ...
222
- def __await__ (self ) -> Generator [Any , None , Any ]: ...
223
- def send (self , __arg : Any ) -> Any : ...
223
+ def __await__ (self ) -> Generator [Any , None , _V_co ]: ...
224
+ def send (self , __arg : _T_contra ) -> _T_co : ...
224
225
@overload
225
- def throw (self , __typ : Type [BaseException ], __val : BaseException | object = ..., __tb : TracebackType | None = ...) -> Any : ...
226
+ def throw (self , __typ : Type [BaseException ], __val : BaseException | object = ..., __tb : TracebackType | None = ...) -> _T_co : ...
226
227
@overload
227
- def throw (self , __typ : BaseException , __val : None = ..., __tb : TracebackType | None = ...) -> Any : ...
228
+ def throw (self , __typ : BaseException , __val : None = ..., __tb : TracebackType | None = ...) -> _T_co : ...
228
229
229
230
class _StaticFunctionType :
230
231
"""Fictional type to correct the type of MethodType.__func__.
0 commit comments