@@ -6,6 +6,7 @@ from typing import (
66 AsyncGenerator ,
77 Awaitable ,
88 Callable ,
9+ Coroutine ,
910 Generator ,
1011 Generic ,
1112 ItemsView ,
@@ -211,20 +212,20 @@ class AsyncGeneratorType(AsyncGenerator[_T_co, _T_contra]):
211212 def aclose (self ) -> Awaitable [None ]: ...
212213
213214@final
214- class CoroutineType :
215+ class CoroutineType ( Coroutine [ _T_co , _T_contra , _V_co ]) :
215216 __name__ : str
216217 __qualname__ : str
217218 cr_await : Any | None
218219 cr_code : CodeType
219220 cr_frame : FrameType
220221 cr_running : bool
221222 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 : ...
224225 @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 : ...
226227 @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 : ...
228229
229230class _StaticFunctionType :
230231 """Fictional type to correct the type of MethodType.__func__.
0 commit comments