11from types import CodeType , FrameType , TracebackType , coroutine
22from typing import Any , Coroutine , Generator , Generic , Iterator , Optional , Type , TypeVar , Union
33
4+ _T = TypeVar ("_T" )
45_T_co = TypeVar ("_T_co" , covariant = True )
56_V_co = TypeVar ("_V_co" , covariant = True )
67_T_contra = TypeVar ("_T_contra" , contravariant = True )
78
8- class AsyncBase :
9+ class AsyncBase ( Generic [ _T ]) :
910 def __init__ (self , file : str , loop : Any , executor : Any ) -> None : ...
10- async def __aiter__ (self ) -> Iterator [str ]: ...
11- async def __anext__ (self ) -> str : ...
11+ async def __aiter__ (self ) -> Iterator [_T ]: ...
12+ async def __anext__ (self ) -> _T : ...
1213
13- class AiofilesContextManager (Generic [_V_co , _T_co , _T_contra ]):
14- def __init__ (self , __coro : Coroutine [_V_co , _T_co , _T_contra ]) -> None : ...
14+ class AiofilesContextManager (Generic [_T_co , _T_contra , _V_co ]):
15+ def __init__ (self , __coro : Coroutine [_T_co , _T_contra , _V_co ]) -> None : ...
1516 def send (self , __value : _T_contra ) -> _T_co : ...
1617 def throw (
1718 self , __typ : Type [BaseException ], __val : Union [BaseException , object ] = ..., tb : Optional [TracebackType ] = ...
@@ -25,10 +26,10 @@ class AiofilesContextManager(Generic[_V_co, _T_co, _T_contra]):
2526 def gi_code (self ) -> CodeType : ...
2627 def __next__ (self ) -> _T_co : ...
2728 @coroutine
28- def __iter__ (self ) -> Iterator [Coroutine [_V_co , _T_co , _T_contra ]]: ...
29- def __await__ (self ) -> Generator [Any , None , _T_co ]: ...
30- async def __anext__ (self ) -> Coroutine [ _V_co , _T_co , _T_contra ] : ...
31- async def __aenter__ (self ) -> Coroutine [ _V_co , _T_co , _T_contra ] : ...
29+ def __iter__ (self ) -> Iterator [Coroutine [_T_co , _T_contra , _V_co ]]: ...
30+ def __await__ (self ) -> Generator [Any , None , _V_co ]: ...
31+ async def __anext__ (self ) -> _V_co : ...
32+ async def __aenter__ (self ) -> _V_co : ...
3233 async def __aexit__ (
3334 self , exc_type : Optional [Type [BaseException ]], exc_val : Optional [BaseException ], exc_tb : Optional [TracebackType ]
3435 ) -> None : ...
0 commit comments