-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type alias for Annotated[some_type, non_type] not supported #9315
Comments
I'd recommend changing the issue topic to "Type alias for Annotated[some_type, non_type] not supported". Because |
I'd like to try fixing this bug 😊 Can I get some hints on where to start? |
Check out typeanal (where mypy tries to understand type annotations) and exprtotype. Throwing in breakpoints is usually a good way to start fixing things in mypy. |
Closes #9315. This PR aims to support Annotated to create type aliases when passing a non type as annotation, like this: ```python class Meta: ... x = Annotated[int, Meta()] ```
The following code:
triggers the following error:
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:
The text was updated successfully, but these errors were encountered: