diff --git a/stdlib/unittest/mock.pyi b/stdlib/unittest/mock.pyi index 381011352..9b37ab7b6 100644 --- a/stdlib/unittest/mock.pyi +++ b/stdlib/unittest/mock.pyi @@ -1,5 +1,5 @@ import sys -from typing import Any, Callable, Generic, Iterable, List, Mapping, Sequence, Tuple, Type, TypeVar, overload +from typing import Any, Awaitable, Callable, Generic, Iterable, List, Mapping, Sequence, Tuple, Type, TypeVar, overload _T = TypeVar("_T") _TT = TypeVar("_TT", bound=Type[Any]) @@ -53,8 +53,6 @@ class _Call(Tuple[Any, ...]): __ne__: Any def __call__(self, *args: Any, **kwargs: Any) -> _Call: ... def __getattr__(self, attr: Any) -> Any: ... - def count(self, *args: Any, **kwargs: Any) -> Any: ... - def index(self, *args: Any, **kwargs: Any) -> Any: ... def call_list(self) -> Any: ... call: _Call @@ -181,6 +179,8 @@ class _patch(Generic[_T]): def __call__(self, func: Callable[..., _R]) -> Callable[..., _R]: ... def decorate_class(self, klass: _TT) -> _TT: ... def decorate_callable(self, func: Callable[..., _R]) -> Callable[..., _R]: ... + if sys.version_info >= (3, 8): + def decorate_async_callable(self, func: Callable[..., Awaitable[_R]]) -> Callable[..., Awaitable[_R]]: ... def get_original(self) -> tuple[Any, bool]: ... target: Any temp_original: Any