mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Improve asyncio callbacks (#8192)
This commit is contained in:
@@ -44,7 +44,7 @@ class Future(Awaitable[_T], Iterable[_T]):
|
||||
def get_loop(self) -> AbstractEventLoop: ...
|
||||
@property
|
||||
def _callbacks(self: Self) -> list[tuple[Callable[[Self], Any], Context]]: ...
|
||||
def add_done_callback(self: Self, __fn: Callable[[Self], Any], *, context: Context | None = ...) -> None: ...
|
||||
def add_done_callback(self: Self, __fn: Callable[[Self], object], *, context: Context | None = ...) -> None: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def cancel(self, msg: Any | None = ...) -> bool: ...
|
||||
else:
|
||||
@@ -54,7 +54,7 @@ class Future(Awaitable[_T], Iterable[_T]):
|
||||
def done(self) -> bool: ...
|
||||
def result(self) -> _T: ...
|
||||
def exception(self) -> BaseException | None: ...
|
||||
def remove_done_callback(self: Self, __fn: Callable[[Self], Any]) -> int: ...
|
||||
def remove_done_callback(self: Self, __fn: Callable[[Self], object]) -> int: ...
|
||||
def set_result(self, __result: _T) -> None: ...
|
||||
def set_exception(self, __exception: type | BaseException) -> None: ...
|
||||
def __iter__(self) -> Generator[Any, None, _T]: ...
|
||||
|
||||
Reference in New Issue
Block a user