You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following example from the 3.9.0 type hinting docs: Vector = list[float]
makes mypy complain that: "list" is not subscriptable, use "typing.List" instead
This differs from 3.8 docs in that they actually use typing.List instead. Is this a doc issue or a mypy issue?
I am aware that I can use typing.List for this case, but if there's an option to not include a module, I would rather take that option.
To Reproduce
Create a Python file with the content above
Run through mypy
Observe that it complains about how "list is not subscriptable" and that I should use typing.List instead
Expected Behavior
I expect it to not complain.
Actual Behavior
It complains.
Your Environment
VSCode with mypy as linter.
Mypy version used: 0.79
Python version used: 3.9
Operating system and version: Win10
The text was updated successfully, but these errors were encountered:
The following example from the 3.9.0 type hinting docs:
Vector = list[float]
makes mypy complain that:
"list" is not subscriptable, use "typing.List" instead
This differs from 3.8 docs in that they actually use typing.List instead. Is this a doc issue or a mypy issue?
I am aware that I can use typing.List for this case, but if there's an option to not include a module, I would rather take that option.
To Reproduce
Expected Behavior
I expect it to not complain.
Actual Behavior
It complains.
Your Environment
VSCode with mypy as linter.
The text was updated successfully, but these errors were encountered: