mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 12:14:27 +08:00
Add py3.7 support to Future.add_done_callback (#2970)
This commit is contained in:
committed by
Jelle Zijlstra
parent
53d4610579
commit
a193aacea8
@@ -41,16 +41,17 @@ class Future(Awaitable[_T], Iterable[_T]):
|
||||
if sys.version_info >= (3, 7):
|
||||
def get_loop(self) -> AbstractEventLoop: ...
|
||||
def _callbacks(self: _S) -> List[Tuple[Callable[[_S], Any], Context]]: ...
|
||||
def add_done_callback(self: _S, __fn: Callable[[_S], Any], *, context: Optional[Context] = ...) -> None: ...
|
||||
else:
|
||||
@property
|
||||
def _callbacks(self: _S) -> List[Callable[[_S], Any]]: ...
|
||||
def add_done_callback(self: _S, __fn: Callable[[_S], Any]) -> None: ...
|
||||
def cancel(self) -> bool: ...
|
||||
def _schedule_callbacks(self) -> None: ...
|
||||
def cancelled(self) -> bool: ...
|
||||
def done(self) -> bool: ...
|
||||
def result(self) -> _T: ...
|
||||
def exception(self) -> BaseException: ...
|
||||
def add_done_callback(self: _S, fn: Callable[[_S], Any]) -> None: ...
|
||||
def remove_done_callback(self: _S, fn: Callable[[_S], Any]) -> int: ...
|
||||
def set_result(self, result: _T) -> None: ...
|
||||
def set_exception(self, exception: Union[type, BaseException]) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user