mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-30 08:04:24 +08:00
Clean up files with former forced consistency (#4717)
Replace Text with str in Python 3 code
This commit is contained in:
@@ -49,14 +49,8 @@ class Future(Generic[_T]):
|
||||
def result(self, timeout: Optional[float] = ...) -> _T: ...
|
||||
def set_running_or_notify_cancel(self) -> bool: ...
|
||||
def set_result(self, result: _T) -> None: ...
|
||||
if sys.version_info >= (3,):
|
||||
def exception(self, timeout: Optional[float] = ...) -> Optional[BaseException]: ...
|
||||
def set_exception(self, exception: Optional[BaseException]) -> None: ...
|
||||
else:
|
||||
def exception(self, timeout: Optional[float] = ...) -> Any: ...
|
||||
def exception_info(self, timeout: Optional[float] = ...) -> Tuple[Any, Optional[TracebackType]]: ...
|
||||
def set_exception(self, exception: Any) -> None: ...
|
||||
def set_exception_info(self, exception: Any, traceback: Optional[TracebackType]) -> None: ...
|
||||
def exception(self, timeout: Optional[float] = ...) -> Optional[BaseException]: ...
|
||||
def set_exception(self, exception: Optional[BaseException]) -> None: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def __class_getitem__(cls, item: Any) -> GenericAlias: ...
|
||||
|
||||
@@ -65,12 +59,9 @@ class Executor:
|
||||
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, 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 map(
|
||||
self, fn: Callable[..., _T], *iterables: Iterable[Any], timeout: Optional[float] = ..., chunksize: int = ...
|
||||
) -> Iterator[_T]: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def shutdown(self, wait: bool = ..., *, cancel_futures: bool = ...) -> None: ...
|
||||
else:
|
||||
|
||||
@@ -9,7 +9,7 @@ if sys.version_info >= (3, 7):
|
||||
from ._base import BrokenExecutor
|
||||
class BrokenProcessPool(BrokenExecutor): ...
|
||||
|
||||
elif sys.version_info >= (3,):
|
||||
else:
|
||||
class BrokenProcessPool(RuntimeError): ...
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
|
||||
@@ -21,7 +21,7 @@ class ThreadPoolExecutor(Executor):
|
||||
initializer: Optional[Callable[..., None]] = ...,
|
||||
initargs: Tuple[Any, ...] = ...,
|
||||
) -> None: ...
|
||||
elif sys.version_info >= (3, 6) or sys.version_info < (3,):
|
||||
elif sys.version_info >= (3, 6):
|
||||
def __init__(self, max_workers: Optional[int] = ..., thread_name_prefix: str = ...) -> None: ...
|
||||
else:
|
||||
def __init__(self, max_workers: Optional[int] = ...) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user