mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 14:01:55 +08:00
Remove Python 3.7 branches (#11238)
This commit is contained in:
@@ -13,18 +13,9 @@ _S = TypeVar("_S")
|
||||
_T = TypeVar("_T")
|
||||
|
||||
class ApplyResult(Generic[_T]):
|
||||
if sys.version_info >= (3, 8):
|
||||
def __init__(
|
||||
self, pool: Pool, callback: Callable[[_T], object] | None, error_callback: Callable[[BaseException], object] | None
|
||||
) -> None: ...
|
||||
else:
|
||||
def __init__(
|
||||
self,
|
||||
cache: dict[int, ApplyResult[Any]],
|
||||
callback: Callable[[_T], object] | None,
|
||||
error_callback: Callable[[BaseException], object] | None,
|
||||
) -> None: ...
|
||||
|
||||
def __init__(
|
||||
self, pool: Pool, callback: Callable[[_T], object] | None, error_callback: Callable[[BaseException], object] | None
|
||||
) -> None: ...
|
||||
def get(self, timeout: float | None = None) -> _T: ...
|
||||
def wait(self, timeout: float | None = None) -> None: ...
|
||||
def ready(self) -> bool: ...
|
||||
@@ -36,31 +27,17 @@ class ApplyResult(Generic[_T]):
|
||||
AsyncResult = ApplyResult
|
||||
|
||||
class MapResult(ApplyResult[list[_T]]):
|
||||
if sys.version_info >= (3, 8):
|
||||
def __init__(
|
||||
self,
|
||||
pool: Pool,
|
||||
chunksize: int,
|
||||
length: int,
|
||||
callback: Callable[[list[_T]], object] | None,
|
||||
error_callback: Callable[[BaseException], object] | None,
|
||||
) -> None: ...
|
||||
else:
|
||||
def __init__(
|
||||
self,
|
||||
cache: dict[int, ApplyResult[Any]],
|
||||
chunksize: int,
|
||||
length: int,
|
||||
callback: Callable[[list[_T]], object] | None,
|
||||
error_callback: Callable[[BaseException], object] | None,
|
||||
) -> None: ...
|
||||
def __init__(
|
||||
self,
|
||||
pool: Pool,
|
||||
chunksize: int,
|
||||
length: int,
|
||||
callback: Callable[[list[_T]], object] | None,
|
||||
error_callback: Callable[[BaseException], object] | None,
|
||||
) -> None: ...
|
||||
|
||||
class IMapIterator(Iterator[_T]):
|
||||
if sys.version_info >= (3, 8):
|
||||
def __init__(self, pool: Pool) -> None: ...
|
||||
else:
|
||||
def __init__(self, cache: dict[int, IMapIterator[Any]]) -> None: ...
|
||||
|
||||
def __init__(self, pool: Pool) -> None: ...
|
||||
def __iter__(self) -> Self: ...
|
||||
def next(self, timeout: float | None = None) -> _T: ...
|
||||
def __next__(self, timeout: float | None = None) -> _T: ...
|
||||
@@ -120,12 +97,7 @@ class ThreadPool(Pool):
|
||||
) -> None: ...
|
||||
|
||||
# undocumented
|
||||
if sys.version_info >= (3, 8):
|
||||
INIT: Literal["INIT"]
|
||||
RUN: Literal["RUN"]
|
||||
CLOSE: Literal["CLOSE"]
|
||||
TERMINATE: Literal["TERMINATE"]
|
||||
else:
|
||||
RUN: Literal[0]
|
||||
CLOSE: Literal[1]
|
||||
TERMINATE: Literal[2]
|
||||
INIT: Literal["INIT"]
|
||||
RUN: Literal["RUN"]
|
||||
CLOSE: Literal["CLOSE"]
|
||||
TERMINATE: Literal["TERMINATE"]
|
||||
|
||||
Reference in New Issue
Block a user