Upgrade black version (#7089)

This commit is contained in:
Shantanu
2022-01-30 16:27:06 -08:00
committed by GitHub
parent 9854926289
commit b88a6f19cd
173 changed files with 496 additions and 2 deletions

View File

@@ -63,6 +63,7 @@ class Executor:
def submit(self, __fn: Callable[_P, _T], *args: _P.args, **kwargs: _P.kwargs) -> Future[_T]: ...
else:
def submit(self, fn: Callable[_P, _T], *args: _P.args, **kwargs: _P.kwargs) -> Future[_T]: ...
def map(
self, fn: Callable[..., _T], *iterables: Iterable[Any], timeout: float | None = ..., chunksize: int = ...
) -> Iterator[_T]: ...
@@ -70,6 +71,7 @@ class Executor:
def shutdown(self, wait: bool = ..., *, cancel_futures: bool = ...) -> None: ...
else:
def shutdown(self, wait: bool = ...) -> None: ...
def __enter__(self: Self) -> Self: ...
def __exit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> bool | None: ...

View File

@@ -81,6 +81,7 @@ if sys.version_info >= (3, 7):
def __init__(
self, max_size: int | None = ..., *, ctx: BaseContext, pending_work_items: dict[int, _WorkItem[Any]]
) -> None: ...
def _on_queue_feeder_error(self, e: Exception, obj: _CallItem) -> None: ...
def _get_chunks(*iterables: Any, chunksize: int) -> Generator[tuple[Any, ...], None, None]: ...
@@ -130,6 +131,7 @@ def _chain_from_iterable_of_lists(iterable: Iterable[MutableSequence[Any]]) -> A
if sys.version_info >= (3, 7):
from ._base import BrokenExecutor
class BrokenProcessPool(BrokenExecutor): ...
else:
@@ -163,4 +165,5 @@ class ProcessPoolExecutor(Executor):
def __init__(self, max_workers: int | None = ...) -> None: ...
if sys.version_info >= (3, 9):
def _start_executor_manager_thread(self) -> None: ...
def _adjust_process_count(self) -> None: ...

View File

@@ -41,6 +41,7 @@ else:
if sys.version_info >= (3, 7):
from ._base import BrokenExecutor
class BrokenThreadPool(BrokenExecutor): ...
class ThreadPoolExecutor(Executor):
@@ -67,6 +68,7 @@ class ThreadPoolExecutor(Executor):
) -> None: ...
else:
def __init__(self, max_workers: int | None = ..., thread_name_prefix: str = ...) -> None: ...
def _adjust_thread_count(self) -> None: ...
if sys.version_info >= (3, 7):
def _initializer_failed(self) -> None: ...