mirror of
https://github.com/astral-sh/ruff.git
synced 2026-11-21 12:16:15 +08:00
432 B
432 B
What it does
Checks for possibly missing attributes.
Why is this bad?
Attempting to access a missing attribute will raise an AttributeError at runtime.
Rule status
This rule is currently disabled by default because of the number of false positives it can produce.
Examples
class A:
if __name__ == "__main__":
c = 0
# AttributeError: type object 'A' has no attribute 'c'
A.c # error