module documentation

Astroid hook for the attrs library Without this hook pylint reports unsupported-assignment-operation for attrs classes

Function attr_attributes_transform Given that the ClassNode has an attr decorator, rewrite class attributes as instance attributes
Function is_decorated_with_attrs Return whether a decorated node has an attr decorator applied.
Constant ATTRIB_NAMES Undocumented
Constant ATTRS_NAMES Undocumented
def attr_attributes_transform(node: ClassDef): (source)

Given that the ClassNode has an attr decorator, rewrite class attributes as instance attributes

def is_decorated_with_attrs(node, decorator_names=ATTRS_NAMES) -> bool: (source)

Return whether a decorated node has an attr decorator applied.

ATTRIB_NAMES = (source)

Undocumented

Value
frozenset(('attr.ib',
           'attrib',
           'attr.attrib',
           'attr.field',
           'attrs.field',
           'field'))
ATTRS_NAMES = (source)

Undocumented

Value
frozenset(('attr.s',
           'attrs',
           'attr.attrs',
           'attr.attributes',
           'attr.define',
           'attr.mutable',
           'attr.frozen',
...