mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-20 10:51:15 +08:00
various fixes to asyncio stubs (#1305)
This commit is contained in:
committed by
Matthias Kramm
parent
0bda8c0cef
commit
6c5474ae8c
@@ -25,7 +25,7 @@ class Future(Generic[_T]):
|
||||
def cancelled(self) -> bool: ...
|
||||
def running(self) -> bool: ...
|
||||
def done(self) -> bool: ...
|
||||
def add_done_callback(self, fn: Callable[[Future], Any]) -> None: ...
|
||||
def add_done_callback(self, fn: Callable[[Future[_T]], Any]) -> None: ...
|
||||
def result(self, timeout: Optional[float] = ...) -> _T: ...
|
||||
def exception(self, timeout: Optional[float] = ...) -> Optional[BaseException]: ...
|
||||
def set_running_or_notify_cancel(self) -> None: ...
|
||||
@@ -39,6 +39,6 @@ class Executor:
|
||||
def __enter__(self) -> Executor: ...
|
||||
def __exit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> bool: ...
|
||||
|
||||
def as_completed(fs: Iterable[Future], timeout: Optional[float] = ...) -> Iterator[Future]: ...
|
||||
def as_completed(fs: Iterable[Future[_T]], timeout: Optional[float] = ...) -> Iterator[Future[_T]]: ...
|
||||
|
||||
def wait(fs: Iterable[Future], timeout: Optional[float] = ..., return_when: str = ...) -> Tuple[Set[Future], Set[Future]]: ...
|
||||
def wait(fs: Iterable[Future[_T]], timeout: Optional[float] = ..., return_when: str = ...) -> Tuple[Set[Future[_T]], Set[Future[_T]]]: ...
|
||||
|
||||
Reference in New Issue
Block a user