Closed as not planned
Description
Bug: the following code (Python 3.6.7, mypy 0.701)
o = [[1, 2], ["foo", "bar"]]
reveal_type(o)
Outputs a type of builtins.list[builtins.object*]
instead of something like builtins.list[builtins.list[Any]]
. This in turn makes mypy raise an error (in my case) when I try to apply a len
operation on elements of that list:
[len(x) for x in o]
Outputs: error: Argument 1 to "len" has incompatible type "object"; expected "Sized"
This is probably related to #4975 but only the union of Tuple
was evoked there, and it seems that there is the same problem on lists.
Thanks!