Open
Description
Bug Report
mypy
should use List
when surfacing errors with the List
type, not list
.
It's confusing to engineers if mypy
uses list
when complaining about a type error because then engineers are searching the source code for occurrences of list
, when the problem is actually with the usage of List
.
To Reproduce
self.orders: typing.List[typing.List[int, int]] = []
Expected Behavior
mypy
should complain with
error: "List" expects 1 type argument, but 2 given [type-arg]
Actual Behavior
mypy
actually complains with
error: "list" expects 1 type argument, but 2 given [type-arg]
Your Environment
- Mypy version used:
mypy==1.10.0
- Mypy command-line flags: n/a
- Mypy configuration options from
mypy.ini
(and other config files): n/a - Python version used:
Python 3.10.12