Code taken straight from typing documentation (https://docs.python.org/3/library/typing.html#typing.Generic): ``` python from typing import TypeVar, Mapping T = TypeVar('T') class MyDict(Mapping[str, T]): pass ``` Outcome (with both latest mypy from PyPI and development version): ``` % python -m mypy qwe.py qwe.py:5: error: Invalid type "qwe.T" ```