diff --git a/stdlib/2and3/plistlib.pyi b/stdlib/2and3/plistlib.pyi index 279019959841..40a3f97e64da 100644 --- a/stdlib/2and3/plistlib.pyi +++ b/stdlib/2and3/plistlib.pyi @@ -9,7 +9,7 @@ from enum import Enum import sys mm = MutableMapping[str, Any] -_D = TypeVar('_D', mm) +_D = TypeVar('_D', bound=mm) if sys.version_info >= (3,): _Path = str else: diff --git a/stdlib/3/unittest/__init__.pyi b/stdlib/3/unittest/__init__.pyi index 3a3c57ab4d41..f27ee66a272c 100644 --- a/stdlib/3/unittest/__init__.pyi +++ b/stdlib/3/unittest/__init__.pyi @@ -12,14 +12,15 @@ from contextlib import ContextManager _T = TypeVar('_T') -_FT = TypeVar('_FT', Callable[[Any], Any]) +_FT = TypeVar('_FT', bound=Callable[[Any], Any]) _E = TypeVar('_E', bound=Exception) -def skip(reason: str) -> Callable[[_FT], _FT]: ... -def skipIf(condition: object, reason: str) -> Callable[[_FT], _FT]: ... -def skipUnless(condition: object, reason: str) -> Callable[[_FT], _FT]: ... def expectedFailure(func: _FT) -> _FT: ... +# TODO: Once python/mypy#1551 is fixed, the following need _FT instead of Any +def skip(reason: str) -> Callable[[Any], Any]: ... +def skipIf(condition: object, reason: str) -> Callable[[Any], Any]: ... +def skipUnless(condition: object, reason: str) -> Callable[[Any], Any]: ... class SkipTest(Exception): def __init__(self, reason: str) -> None: ...