mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-22 03:41:28 +08:00
stdlib: Add many missing dunder overrides (#7231)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import sys
|
||||
from _typeshed import Self
|
||||
from contextlib import AbstractContextManager
|
||||
from types import TracebackType
|
||||
from typing import Any, Callable, Generic, Iterable, Iterator, Mapping, TypeVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
@@ -67,7 +67,7 @@ class IMapIterator(Iterator[_T]):
|
||||
|
||||
class IMapUnorderedIterator(IMapIterator[_T]): ...
|
||||
|
||||
class Pool(AbstractContextManager[Pool]):
|
||||
class Pool:
|
||||
def __init__(
|
||||
self,
|
||||
processes: int | None = ...,
|
||||
@@ -111,8 +111,9 @@ class Pool(AbstractContextManager[Pool]):
|
||||
def terminate(self) -> None: ...
|
||||
def join(self) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(self, exc_type: type[BaseException], exc_val: BaseException, exc_tb: TracebackType) -> None: ...
|
||||
|
||||
class ThreadPool(Pool, AbstractContextManager[ThreadPool]):
|
||||
class ThreadPool(Pool):
|
||||
def __init__(
|
||||
self, processes: int | None = ..., initializer: Callable[..., Any] | None = ..., initargs: Iterable[Any] = ...
|
||||
) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user