Closed
Description
from typing import Dict
d: Dict[str,str] = dict(token.split('=', 1) for token in ['a=b'])
Fails in mypy 0.782 with:
test/test.py:3: error: Generator has incompatible item type "List[str]"; expected "Tuple[str, str]"
And in pyright 1.1.62 with:
3:20 - error: No overloads for "dict(token.split('=', 1) for token in ['a=b'])" match parameters
Argument types: (Generator[List[str]]) (reportGeneralTypeIssues)
Metadata
Metadata
Assignees
Labels
No labels