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:
Sebastian Rittau
2020-09-23 23:35:19 +02:00
committed by GitHub
parent b33896bcbc
commit 0cd7dd7009
2 changed files with 2 additions and 2 deletions

View File

@@ -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]: ...