diff --git a/third_party/2/concurrent/futures/__init__.pyi b/third_party/2/concurrent/futures/__init__.pyi index 492ee1bfa..5e5888876 100644 --- a/third_party/2/concurrent/futures/__init__.pyi +++ b/third_party/2/concurrent/futures/__init__.pyi @@ -1,7 +1,11 @@ -from typing import TypeVar, Generic, Any, Iterable, Iterator, Callable, Tuple, Union +from typing import TypeVar, Generic, Any, Iterable, Iterator, Callable, Optional, Set, Tuple, Union _T = TypeVar('_T') +class Error(Exception): ... +class CancelledError(Error): ... +class TimeoutError(Error): ... + class Future(Generic[_T]): def cancel(self) -> bool: ... def cancelled(self) -> bool: ... @@ -28,7 +32,7 @@ class ThreadPoolExecutor(Executor): class ProcessPoolExecutor(Executor): def __init__(self, max_workers: Union[int, None] = ...) -> None: ... -def wait(fs: Iterable[Future], timeout: float = ..., return_when: str = ...) -> Tuple[Iterable[Future], Iterable[Future]]: ... +def wait(fs: Iterable[Future], timeout: Optional[float] = ..., return_when: str = ...) -> Tuple[Set[Future], Set[Future]]: ... FIRST_COMPLETED = ... # type: str FIRST_EXCEPTION = ... # type: str