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
FasterSpeeding
changed the title
Attrs plugin mishandles typing.Self in generated inits.
Attrs plugin mishandles typing.Self in generated inits
Feb 12, 2023
Bug Report
MyPy mishandles type comparisons when an argument in an attrs generated init uses
typing.Self
.To Reproduce
Expected Behavior
The attrs version of this code should pass type checking like MyPy does with the following dataclasses and normal init examples
Actual Behavior
MyPy false-positive reports an incompatible type for the argument only when using attrs
Your Environment
mypy.ini
(and other config files):The text was updated successfully, but these errors were encountered: