mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 12:14:27 +08:00
Fix _patch.__call__() (#4568)
_patch.call() reused the type variable _T, which is generic over _patch. It was meant to use a separate type variable for the argument, which is returned. Fixes #4566
This commit is contained in:
2
third_party/2and3/mock.pyi
vendored
2
third_party/2and3/mock.pyi
vendored
@@ -193,7 +193,7 @@ class _patch(Generic[_T]):
|
||||
kwargs: Mapping[str, Any],
|
||||
) -> None: ...
|
||||
def copy(self) -> _patch[_T]: ...
|
||||
def __call__(self, func: _T) -> _T: ...
|
||||
def __call__(self, func: _F) -> _F: ...
|
||||
def decorate_class(self, klass: _TT) -> _TT: ...
|
||||
def decorate_callable(self, func: _F) -> _F: ...
|
||||
def get_original(self) -> Tuple[Any, bool]: ...
|
||||
|
||||
Reference in New Issue
Block a user