module documentation
(source)

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 True if a decorated node has an attr decorator applied.
Constant ATTRIB​_NAMES Undocumented
Constant ATTRS​_NAMES Undocumented
def attr_attributes_transform(node): (source)
Given that the ClassNode has an attr decorator, rewrite class attributes as instance attributes
Parameters
node:ClassDefUndocumented
def is_decorated_with_attrs(node, decorator_names=ATTRS_NAMES): (source)
Return True if a decorated node has an attr decorator applied.
ATTRIB_NAMES = (source)

Undocumented

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

Undocumented

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