# Summary Follow-up to [the review comment on #30143](https://github.com/astral-sh/ruff/pull/30143#discussion_r4513626692). Move the migration notes for the four rules that were split in 0.0.100 into "Rule history" sections.
1.0 KiB
What it does
Checks for references to attributes that ty cannot find on the object's type. For a union, this rule
applies when every member lacks the attribute. If only some members lack it, ty reports
missing-union-attribute.
Why is this bad?
Accessing an unbound attribute will raise an AttributeError at runtime. An unresolved attribute is
not guaranteed to exist from the type alone, so this could also indicate that the object is not of
the type that the user expects.
Examples
class A: ...
# AttributeError: 'A' object has no attribute 'foo'
A().foo # error
Rule history
-
v0.0.100: ty used to have a rule called
unresolved-attributethat covered bothmissing-attributeandmissing-union-attribute.The old
unresolved-attributename is now an alias formissing-attributeonly. If you previously had any configuration forunresolved-attributespecifically, you should go throughmissing-union-attributeto see if you want to configure it in the same way.