Derived from the Pylint linter.
What it does#
Checks for assignments to attributes that are not defined in
Why is this bad?#
__slots__, only the specified attributes are allowed.
Attempting to assign to an attribute that is not defined in
will result in an
AttributeError at runtime.
This rule can't detect
__slots__ implementations in superclasses, and
so limits its analysis to classes that inherit from (at most)