-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
Description
Bug Report
In the typing docs for TypedDict there is an example of defining a TypedDict using keywords mapped to types
Point2D = TypedDict('Point2D', x=int, y=int, label=str)
When running mypy on this exact example, I get the following error:
type_test.py:4: error: Too many arguments for TypedDict()
If using the alternative definition with a positional dictionary, no error.
Point2D = TypedDict('Point2D', {'x': int, 'y': int, 'label': str})
To Reproduce
- Create a file with the above code example and necessary imports
- Run mypy on file
- Observe error message
Expected Behavior
No error
Actual Behavior
Error.
Your Environment
- Mypy version used: 0.812 and 0.910 tested
- Mypy command-line flags: none
- Mypy configuration options from
mypy.ini(and other config files): ignore_missing_imports=true - Python version used: 3.9.2
- Operating system and version: macOS 11.6