We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Are you reporting a bug, or opening a feature request? Bug
Please insert below the code you are checking with mypy
from dataclasses import dataclass, asdict, astuple @dataclass class A: x: int = 0 y: int = 0 @dataclass class B(A): z: int = 0 a = A(1, 1) # tuple unpacking -- fails b = B(*astuple(a), z=1) # error: "B" gets multiple values for keyword argument "z" assert b == B(x=1, y=1, z=1) # tuple unpacking -- fails b = B(*astuple(a), 1) # Too many arguments for "B" assert b == B(x=1, y=1, z=1) # dict unpacking -- succeeds b = B(z=1, **asdict(a)) assert b == B(x=1, y=1, z=1) # dict unpacking -- fails b = B(**asdict(a), z=1) # "B" gets multiple values for keyword argument "z" assert b == B(x=1, y=1, z=1)
mypy example.py example.py:16: error: "B" gets multiple values for keyword argument "z" example.py:20: error: Too many arguments for "B" example.py:28: error: "B" gets multiple values for keyword argument "z" Found 3 errors in 1 file (checked 1 source file)
But python3 example.py succeeds with no errors.
python3 example.py
Ideally this should typecheck successfully. At least the error message should be more accurate.
Same results with: mypy 0.740+dev.beec11a28fd835acb1e4ee8b2bf14d969c4e5922
The text was updated successfully, but these errors were encountered:
I think this is essentially a duplicate of #5152
Sorry, something went wrong.
No branches or pull requests
Are you reporting a bug, or opening a feature request?
Bug
Please insert below the code you are checking with mypy
But
python3 example.py
succeeds with no errors.Ideally this should typecheck successfully. At least the error message should be more accurate.
Same results with: mypy 0.740+dev.beec11a28fd835acb1e4ee8b2bf14d969c4e5922
None
The text was updated successfully, but these errors were encountered: