diff --git a/mypy/test/teststubtest.py b/mypy/test/teststubtest.py index b82e77386c7a..1db2645e3a86 100644 --- a/mypy/test/teststubtest.py +++ b/mypy/test/teststubtest.py @@ -52,6 +52,7 @@ def __init__(self, name, covariant: bool = ..., contravariant: bool = ...) -> No class ParamSpec: def __init__(self, name: str) -> None: ... +AnyStr = TypeVar("AnyStr", str, bytes) _T = TypeVar("_T") _T_co = TypeVar("_T_co", covariant=True) _K = TypeVar("_K") @@ -62,7 +63,7 @@ def __init__(self, name: str) -> None: ... class Coroutine(Generic[_T_co, _S, _R]): ... class Iterable(Generic[_T_co]): ... class Mapping(Generic[_K, _V]): ... -class Match(Generic[_T]): ... +class Match(Generic[AnyStr]): ... class Sequence(Iterable[_T_co]): ... class Tuple(Sequence[_T_co]): ... def overload(func: _T) -> _T: ...