Closed
Description
Using mypy 0.600
, running mypy
on
x = [[], [1, 2], [3, 4]]
reveal_type(x)
shows
test.py:2: error: Revealed type is 'builtins.list[builtins.object*]'
If this doesn't have the empty list, then mypy
infers 'builtins.list[builtins.list*[builtins.int]]'
for
x = [[1, 2], [3, 4]]
reveal_type(x)
Ideally, mypy
would be able to infer List[List[int]]
even when there's an empty list.