Closed
Description
The following code:
from typing_extensions import Annotated
class Positive:...
PositiveInt = Annotated[int, Positive()]
triggers the following error:
test.py:3: error: Invalid type alias: expression is not a valid type
Mypy version: mypy 0.782
Python version: Python 3.7.7 (default, May 10 2020, 19:54:23)
[Clang 11.0.3 (clang-1103.0.32.59)] on darwin
Mypy config:
[mypy]
disallow_subclassing_any = True
disallow_any_generics = True
disallow_untyped_calls = True
disallow_untyped_defs = True
disallow_incomplete_defs = True
disallow_untyped_decorators = True
no_implicit_optional = True
warn_return_any = True
strict_equality = True
ignore_missing_imports = False
strict_optional = True
warn_unused_ignores = True
warn_redundant_casts = True
warn_unused_configs = True
warn_unreachable = True
check_untyped_defs = True
new_semantic_analyzer = True