1 from _typeshed import Self
2 from types import CodeType, FrameType, TracebackType, coroutine
3 from typing import Any, Coroutine, Generator, Generic, Iterator, Type, TypeVar
6 _T_co = TypeVar("_T_co", covariant=True)
7 _V_co = TypeVar("_V_co", covariant=True)
8 _T_contra = TypeVar("_T_contra", contravariant=True)
10 class AsyncBase(Generic[_T]):
11 def __init__(self, file: str, loop: Any, executor: Any) -> None: ...
12 def __aiter__(self: Self) -> Self: ...
13 async def __anext__(self) -> _T: ...
15 class AiofilesContextManager(Generic[_T_co, _T_contra, _V_co]):
16 def __init__(self, coro: Coroutine[_T_co, _T_contra, _V_co]) -> None: ...
17 def send(self, value: _T_contra) -> _T_co: ...
18 def throw(self, typ: Type[BaseException], val: BaseException | object = ..., tb: TracebackType | None = ...) -> _T_co: ...
19 def close(self) -> None: ...
21 def gi_frame(self) -> FrameType: ...
23 def gi_running(self) -> bool: ...
25 def gi_code(self) -> CodeType: ...
26 def __next__(self) -> _T_co: ...
28 def __iter__(self) -> Iterator[Coroutine[_T_co, _T_contra, _V_co]]: ...
29 def __await__(self) -> Generator[Any, None, _V_co]: ...
30 async def __anext__(self) -> _V_co: ...
31 async def __aenter__(self) -> _V_co: ...
33 self, exc_type: Type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None