-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
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
__match_args__
is not added to dataclasses with no fields
#15748
Comments
I think this manifests as a stubtest false positive, but the underlying issue is probably that mypy isn't synthesising |
Could be from this condition mypy/mypy/plugins/dataclasses.py Line 368 in 14e7768
I am not sure why there is a check for attributes here |
Looks like it to me!
Nor me... want to make a PR? :) |
Alright, I'll give it a try. |
__match_args__
is not added to dataclasses with no fields
At a guess, I'd imagine it was probably just an oversight :) |
Bug Report
stubtest complains about missing
__match_args__
if the dataclass has no fieldsTo Reproduce
Consider this python file:
and the corresponding stub file
Expected Behavior
Actual Behavior
Your Environment
mypy.ini
(and other config files): N/AThe text was updated successfully, but these errors were encountered: