stdlib: add argument default values (#9501)

This commit is contained in:
Jelle Zijlstra
2023-01-18 00:37:34 -08:00
committed by GitHub
parent 6cb934291f
commit ddfaca3200
272 changed files with 2529 additions and 2467 deletions

View File

@@ -26,8 +26,8 @@ class ApplyResult(Generic[_T]):
error_callback: Callable[[BaseException], object] | None,
) -> None: ...
def get(self, timeout: float | None = ...) -> _T: ...
def wait(self, timeout: float | None = ...) -> None: ...
def get(self, timeout: float | None = None) -> _T: ...
def wait(self, timeout: float | None = None) -> None: ...
def ready(self) -> bool: ...
def successful(self) -> bool: ...
if sys.version_info >= (3, 9):
@@ -63,19 +63,19 @@ class IMapIterator(Iterator[_T]):
def __init__(self, cache: dict[int, IMapIterator[Any]]) -> None: ...
def __iter__(self: Self) -> Self: ...
def next(self, timeout: float | None = ...) -> _T: ...
def __next__(self, timeout: float | None = ...) -> _T: ...
def next(self, timeout: float | None = None) -> _T: ...
def __next__(self, timeout: float | None = None) -> _T: ...
class IMapUnorderedIterator(IMapIterator[_T]): ...
class Pool:
def __init__(
self,
processes: int | None = ...,
initializer: Callable[..., object] | None = ...,
processes: int | None = None,
initializer: Callable[..., object] | None = None,
initargs: Iterable[Any] = ...,
maxtasksperchild: int | None = ...,
context: Any | None = ...,
maxtasksperchild: int | None = None,
context: Any | None = None,
) -> None: ...
def apply(self, func: Callable[..., _T], args: Iterable[Any] = ..., kwds: Mapping[str, Any] = ...) -> _T: ...
def apply_async(
@@ -83,30 +83,28 @@ class Pool:
func: Callable[..., _T],
args: Iterable[Any] = ...,
kwds: Mapping[str, Any] = ...,
callback: Callable[[_T], object] | None = ...,
error_callback: Callable[[BaseException], object] | None = ...,
callback: Callable[[_T], object] | None = None,
error_callback: Callable[[BaseException], object] | None = None,
) -> AsyncResult[_T]: ...
def map(self, func: Callable[[_S], _T], iterable: Iterable[_S], chunksize: int | None = ...) -> list[_T]: ...
def map(self, func: Callable[[_S], _T], iterable: Iterable[_S], chunksize: int | None = None) -> list[_T]: ...
def map_async(
self,
func: Callable[[_S], _T],
iterable: Iterable[_S],
chunksize: int | None = ...,
callback: Callable[[_T], object] | None = ...,
error_callback: Callable[[BaseException], object] | None = ...,
chunksize: int | None = None,
callback: Callable[[_T], object] | None = None,
error_callback: Callable[[BaseException], object] | None = None,
) -> MapResult[_T]: ...
def imap(self, func: Callable[[_S], _T], iterable: Iterable[_S], chunksize: int | None = ...) -> IMapIterator[_T]: ...
def imap_unordered(
self, func: Callable[[_S], _T], iterable: Iterable[_S], chunksize: int | None = ...
) -> IMapIterator[_T]: ...
def starmap(self, func: Callable[..., _T], iterable: Iterable[Iterable[Any]], chunksize: int | None = ...) -> list[_T]: ...
def imap(self, func: Callable[[_S], _T], iterable: Iterable[_S], chunksize: int | None = 1) -> IMapIterator[_T]: ...
def imap_unordered(self, func: Callable[[_S], _T], iterable: Iterable[_S], chunksize: int | None = 1) -> IMapIterator[_T]: ...
def starmap(self, func: Callable[..., _T], iterable: Iterable[Iterable[Any]], chunksize: int | None = None) -> list[_T]: ...
def starmap_async(
self,
func: Callable[..., _T],
iterable: Iterable[Iterable[Any]],
chunksize: int | None = ...,
callback: Callable[[_T], object] | None = ...,
error_callback: Callable[[BaseException], object] | None = ...,
chunksize: int | None = None,
callback: Callable[[_T], object] | None = None,
error_callback: Callable[[BaseException], object] | None = None,
) -> AsyncResult[list[_T]]: ...
def close(self) -> None: ...
def terminate(self) -> None: ...
@@ -118,7 +116,7 @@ class Pool:
class ThreadPool(Pool):
def __init__(
self, processes: int | None = ..., initializer: Callable[..., object] | None = ..., initargs: Iterable[Any] = ...
self, processes: int | None = None, initializer: Callable[..., object] | None = None, initargs: Iterable[Any] = ...
) -> None: ...
# undocumented