You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
kw_only dataclass fields confuse mypy on argument order #19017
Mypy should accept the code. Its output suggests it is confused about positional argument order (and their number).
Actual Behavior
Mypy 1.15 says:
main.py:8: error: "User" gets multiple values for keyword argument "id" [misc]
main.py:8: error: Too few arguments for "User" [call-arg]
main.py:8: error: Argument 1 to "User" has incompatible type "str"; expected "int" [arg-type]
Found 3 errors in 1 file (checked 1 source file)
Your Environment
Mypy version used: 1.15
Mypy command-line flags: none
Mypy configuration options from mypy.ini (and other config files): none
Activity
Merge remote-tracking branch 'upstream/master' into bugfix/pythongh-1…
Move dataclass kw_only fields to the end of the signature (#19018)