diff --git a/third_party/2/concurrent/futures/__init__.pyi b/third_party/2/concurrent/futures/__init__.pyi index 4604830ed..dfae50b23 100644 --- a/third_party/2/concurrent/futures/__init__.pyi +++ b/third_party/2/concurrent/futures/__init__.pyi @@ -17,12 +17,12 @@ class Future(Generic[_T]): def result(self, timeout: Optional[float] = ...) -> _T: ... def exception(self, timeout: Optional[float] = ...) -> Any: ... def exception_info(self, timeout: Optional[float] = ...) -> Tuple[Any, Optional[TracebackType]]: ... - def add_done_callback(self, fn: Callable[[Future], Any]) -> None: ... + def add_done_callback(self, fn: Callable[[Future[_T]], Any]) -> None: ... def set_running_or_notify_cancel(self) -> bool: ... def set_result(self, result: _T) -> None: ... def set_exception(self, exception: Any) -> None: ... - def set_exception_info(self, exception: Any, traceback: TracebackType) -> None: ... + def set_exception_info(self, exception: Any, traceback: Optional[TracebackType]) -> None: ... class Executor: def submit(self, fn: Callable[..., _T], *args: Any, **kwargs: Any) -> Future[_T]: ... @@ -37,10 +37,10 @@ class ThreadPoolExecutor(Executor): class ProcessPoolExecutor(Executor): def __init__(self, max_workers: Optional[int] = ...) -> None: ... -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]]]: ... FIRST_COMPLETED = ... # type: str FIRST_EXCEPTION = ... # type: str ALL_COMPLETED = ... # type: str -def as_completed(fs: Iterable[Future], timeout: Optional[float] = ...) -> Iterator[Future]: ... +def as_completed(fs: Iterable[Future[_T]], timeout: Optional[float] = ...) -> Iterator[Future[_T]]: ...