Open
Description
Bug Report
At runtime the following code snippet:
def f(*, x: int = 9, y:int = 8) -> None:
pass
kwargs = {"x": 1, "y": 2}
f(*kwargs)
results in TypeError: f() takes 0 positional arguments but 2 were given. However, mypy does not report any issues.
To Reproduce
- Execute python interpreter for the code snipped above.
- Run mypy for the code snippet above.
Expected Behavior
Mypy should yield an error. For example pytype yields the following error:
Function f expects 0 arg(s), got 2 [wrong-arg-count]
Expected: (*, x, y)
Actually passed: (_, _)
Actual Behavior
Success: no issues found in 1 source file
Your Environment
- Mypy version used: 0.931
- Mypy command-line flags: None. Simply
mypy <FILENAME>
. - Mypy configuration options from
mypy.ini
(and other config files): N/A (defaults) - Python version used: 3.8.2
- Operating system and version: Mac OS Big Sur