Exactly. We’ll run the script today.
1 Like
1/10/2026
During the upgrade to Python 3.13, Annotation Assignment normalization has been “fixed” by explicitly assigning None to non-parameter Annotations that are written without assignments - AKA where an unassigned annotation is used within a dataclass or as an unassigned class/function attribute in a regular class or method.
AnnAssign(
target=Name(id='r', ctx=Store()),
annotation=Constant(value=Int),
simple=1)
We now change that to a non-annotated assignment with None as a value.
Assign(targets=[node.target],
value=node.value if node.value else Constant(value=None),
lineno=node.lineno)
This change will be merged within the next week or so, and will then enable representations of dataclass code that uses slots, kw_only, frozen, and unassigned but type annotated fields.
1 Like