diff --git a/stdlib/unittest/mock.pyi b/stdlib/unittest/mock.pyi index f3e58bcd1c00..202a6d4596e0 100644 --- a/stdlib/unittest/mock.pyi +++ b/stdlib/unittest/mock.pyi @@ -1,6 +1,6 @@ import sys from _typeshed import MaybeNone -from collections.abc import Awaitable, Callable, Coroutine, Iterable, Mapping, Sequence +from collections.abc import AsyncIterator, Awaitable, Callable, Coroutine, Iterable, Iterator, Mapping, Sequence from contextlib import _GeneratorContextManager from types import TracebackType from typing import Any, ClassVar, Final, Generic, Literal, TypeVar, overload, type_check_only @@ -472,7 +472,83 @@ class _patcher: patch: _patcher class MagicMixin(Base): - def __init__(self, *args: Any, **kw: Any) -> None: ... + def __lt__(self, other: object) -> Any: ... + def __gt__(self, other: object) -> Any: ... + def __ge__(self, other: object) -> Any: ... + def __le__(self, other: object) -> Any: ... + def __int__(self) -> Literal[1]: ... + def __containts__(self) -> Literal[False]: ... + def __len__(self) -> Literal[0]: ... + def __exit__(self, exctype: object, excinst: object, exctb: object, /) -> Literal[False]: ... + def __aexit__(self, exctype: object, excinst: object, exctb: object, /) -> Literal[False]: ... + def __next__(self) -> Self: ... + def __anext__(self) -> AsyncMockMixin: ... + def __complex__(self) -> complex: ... + def __float__(self) -> float: ... + def __bool__(self) -> Literal[True]: ... + def __index__(self) -> Literal[1]: ... + def __hash__(self) -> int: ... + def __sizeof__(self) -> int: ... + def __fspath__(self) -> str: ... + def __eq__(self, other: object, /) -> Any: ... + def __ne__(self, other: object, /) -> Any: ... + def __iter__(self) -> Iterator[Any]: ... + def __aiter__(self) -> AsyncIterator[Any]: ... + def __abs__(self, *args: Any, **kwargs: Any) -> Self: ... + def __add__(self, *args: Any, **kwargs: Any) -> Self: ... + def __aenter__(self, *args: Any, **kwargs: Any) -> Self: ... + def __and__(self, *args: Any, **kwargs: Any) -> Self: ... + def __ceil__(self, *args: Any, **kwargs: Any) -> Self: ... + def __delitem__(self, *args: Any, **kwargs: Any) -> Self: ... + def __divmod__(self, *args: Any, **kwargs: Any) -> Self: ... + def __enter__(self, *args: Any, **kwargs: Any) -> Self: ... + def __floor__(self, *args: Any, **kwargs: Any) -> Self: ... + def __floordiv__(self, *args: Any, **kwargs: Any) -> Self: ... + def __getitem__(self, *args: Any, **kwargs: Any) -> Self: ... + def __iadd__(self, *args: Any, **kwargs: Any) -> Self: ... + def __iand__(self, *args: Any, **kwargs: Any) -> Self: ... + def __ifloordiv__(self, *args: Any, **kwargs: Any) -> Self: ... + def __ilshift__(self, *args: Any, **kwargs: Any) -> Self: ... + def __imatmul__(self, *args: Any, **kwargs: Any) -> Self: ... + def __imod__(self, *args: Any, **kwargs: Any) -> Self: ... + def __imul__(self, *args: Any, **kwargs: Any) -> Self: ... + def __invert__(self, *args: Any, **kwargs: Any) -> Self: ... + def __ior__(self, *args: Any, **kwargs: Any) -> Self: ... + def __ipow__(self, *args: Any, **kwargs: Any) -> Self: ... + def __irshift__(self, *args: Any, **kwargs: Any) -> Self: ... + def __isub__(self, *args: Any, **kwargs: Any) -> Self: ... + def __itruediv__(self, *args: Any, **kwargs: Any) -> Self: ... + def __ixor__(self, *args: Any, **kwargs: Any) -> Self: ... + def __lshift__(self, *args: Any, **kwargs: Any) -> Self: ... + def __matmul__(self, *args: Any, **kwargs: Any) -> Self: ... + def __mod__(self, *args: Any, **kwargs: Any) -> Self: ... + def __mul__(self, *args: Any, **kwargs: Any) -> Self: ... + def __neg__(self, *args: Any, **kwargs: Any) -> Self: ... + def __or__(self, *args: Any, **kwargs: Any) -> Self: ... + def __pos__(self, *args: Any, **kwargs: Any) -> Self: ... + def __pow__(self, *args: Any, **kwargs: Any) -> Self: ... + def __radd__(self, *args: Any, **kwargs: Any) -> Self: ... + def __rand__(self, *args: Any, **kwargs: Any) -> Self: ... + def __rdivmod__(self, *args: Any, **kwargs: Any) -> Self: ... + def __rfloordiv__(self, *args: Any, **kwargs: Any) -> Self: ... + def __rlshift__(self, *args: Any, **kwargs: Any) -> Self: ... + def __rmatmul__(self, *args: Any, **kwargs: Any) -> Self: ... + def __rmod__(self, *args: Any, **kwargs: Any) -> Self: ... + def __rmul__(self, *args: Any, **kwargs: Any) -> Self: ... + def __ror__(self, *args: Any, **kwargs: Any) -> Self: ... + def __round__(self, *args: Any, **kwargs: Any) -> Self: ... + def __rpow__(self, *args: Any, **kwargs: Any) -> Self: ... + def __rrshift__(self, *args: Any, **kwargs: Any) -> Self: ... + def __rshift__(self, *args: Any, **kwargs: Any) -> Self: ... + def __rsub__(self, *args: Any, **kwargs: Any) -> Self: ... + def __rtruediv__(self, *args: Any, **kwargs: Any) -> Self: ... + def __rxor__(self, *args: Any, **kwargs: Any) -> Self: ... + def __setitem__(self, *args: Any, **kwargs: Any) -> Self: ... + def __sub__(self, *args: Any, **kwargs: Any) -> Self: ... + def __truediv__(self, *args: Any, **kwargs: Any) -> Self: ... + def __trunc__(self, *args: Any, **kwargs: Any) -> Self: ... + def __xor__(self, *args: Any, **kwargs: Any) -> Self: ... + def __getattr__(self, attr: str, /) -> Any: ... class NonCallableMagicMock(MagicMixin, NonCallableMock): ... class MagicMock(MagicMixin, Mock): ...