Closed
Description
list('abc')
should be inferred to be of type List[str]. However, we still get errors if used as the argument to a function.
MRE
import collections
named_tuple = collections.namedtuple('Test', list('abc'))
Command used
mypy code.py
Version
mypy 0.720
Python 3.7.4
Actual output
error: List or tuple literal expected as the second argument to namedtuple()
.
Expected behaviour
I would expect it to succeed without error.
Reference: pandas-dev/pandas#29114 (comment)
Metadata
Metadata
Assignees
Labels
No labels