mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 12:14:27 +08:00
concurrent.futures: update for py39, minor fixes (#4503)
Note the new parameter doesn't actually exist on the base class, even though it's documented as that being the case. Asked about it in https://bugs.python.org/issue39349 Co-authored-by: hauntsaninja <>
This commit is contained in:
@@ -46,14 +46,20 @@ class Future(Generic[_T]):
|
||||
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]: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def submit(self, __fn: Callable[..., _T], *args: Any, **kwargs: Any) -> Future[_T]: ...
|
||||
else:
|
||||
def submit(self, fn: Callable[..., _T], *args: Any, **kwargs: Any) -> Future[_T]: ...
|
||||
if sys.version_info >= (3, 5):
|
||||
def map(
|
||||
self, func: Callable[..., _T], *iterables: Iterable[Any], timeout: Optional[float] = ..., chunksize: int = ...
|
||||
self, fn: Callable[..., _T], *iterables: Iterable[Any], timeout: Optional[float] = ..., chunksize: int = ...
|
||||
) -> Iterator[_T]: ...
|
||||
else:
|
||||
def map(self, func: Callable[..., _T], *iterables: Iterable[Any], timeout: Optional[float] = ...) -> Iterator[_T]: ...
|
||||
def shutdown(self, wait: bool = ...) -> None: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def shutdown(self, wait: bool = ..., *, cancel_futures: bool = ...) -> None: ...
|
||||
else:
|
||||
def shutdown(self, wait: bool = ...) -> None: ...
|
||||
def __enter__(self: _T) -> _T: ...
|
||||
def __exit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> Optional[bool]: ...
|
||||
|
||||
|
||||
12
third_party/2/concurrent/futures/_base.pyi
vendored
12
third_party/2/concurrent/futures/_base.pyi
vendored
@@ -46,14 +46,20 @@ class Future(Generic[_T]):
|
||||
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]: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def submit(self, __fn: Callable[..., _T], *args: Any, **kwargs: Any) -> Future[_T]: ...
|
||||
else:
|
||||
def submit(self, fn: Callable[..., _T], *args: Any, **kwargs: Any) -> Future[_T]: ...
|
||||
if sys.version_info >= (3, 5):
|
||||
def map(
|
||||
self, func: Callable[..., _T], *iterables: Iterable[Any], timeout: Optional[float] = ..., chunksize: int = ...
|
||||
self, fn: Callable[..., _T], *iterables: Iterable[Any], timeout: Optional[float] = ..., chunksize: int = ...
|
||||
) -> Iterator[_T]: ...
|
||||
else:
|
||||
def map(self, func: Callable[..., _T], *iterables: Iterable[Any], timeout: Optional[float] = ...) -> Iterator[_T]: ...
|
||||
def shutdown(self, wait: bool = ...) -> None: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def shutdown(self, wait: bool = ..., *, cancel_futures: bool = ...) -> None: ...
|
||||
else:
|
||||
def shutdown(self, wait: bool = ...) -> None: ...
|
||||
def __enter__(self: _T) -> _T: ...
|
||||
def __exit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> Optional[bool]: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user