mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Fix unittest.mock.patch class decorator annotation. (#6070)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import sys
|
||||
from typing import Any, Callable, Generic, Iterable, List, Mapping, Sequence, Tuple, Type, TypeVar, overload
|
||||
|
||||
_F = TypeVar("_F", bound=Callable[..., Any])
|
||||
_T = TypeVar("_T")
|
||||
_TT = TypeVar("_TT", bound=Type[Any])
|
||||
_R = TypeVar("_R")
|
||||
@@ -176,9 +175,12 @@ class _patch(Generic[_T]):
|
||||
kwargs: Mapping[str, Any],
|
||||
) -> None: ...
|
||||
def copy(self) -> _patch[_T]: ...
|
||||
@overload
|
||||
def __call__(self, func: _TT) -> _TT: ...
|
||||
@overload
|
||||
def __call__(self, func: Callable[..., _R]) -> Callable[..., _R]: ...
|
||||
def decorate_class(self, klass: _TT) -> _TT: ...
|
||||
def decorate_callable(self, func: _F) -> _F: ...
|
||||
def decorate_callable(self, func: Callable[..., _R]) -> Callable[..., _R]: ...
|
||||
def get_original(self) -> Tuple[Any, bool]: ...
|
||||
target: Any
|
||||
temp_original: Any
|
||||
|
||||
Reference in New Issue
Block a user