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
When using dataclass_transform, __init__ does not know about attributes defined in TYPE_CHECKING #14853
Activity
KRunchPL commentedon Mar 8, 2023
The issue seems to be around this line. The
IfStmtin the class body is just skipped, because it is notAssignmentStmt.I have drafted a quick, dirty fix, to look inside the
IfStmtand the issue was fixed.Support `if` statements in `dataclass` and `dataclass_transform` plug…