diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2018-10-02 09:43:56 +0200 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2018-10-02 09:43:56 +0200 |
commit | add5f7b8eba427de9d39caae864bbc6dc37ef980 (patch) | |
tree | 86bb7df77f389062879365e97df0c3d53d38a8a6 /astroid/brain/brain_attrs.py | |
parent | bb46cd198b93f3715da94089d42f39fc910892ff (diff) | |
download | astroid-git-add5f7b8eba427de9d39caae864bbc6dc37ef980.tar.gz |
Initial formatting of astroid
Diffstat (limited to 'astroid/brain/brain_attrs.py')
-rw-r--r-- | astroid/brain/brain_attrs.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/astroid/brain/brain_attrs.py b/astroid/brain/brain_attrs.py index 06dc912f..74d1aa34 100644 --- a/astroid/brain/brain_attrs.py +++ b/astroid/brain/brain_attrs.py @@ -11,11 +11,12 @@ import astroid from astroid import MANAGER -ATTR_IB = 'attr.ib' +ATTR_IB = "attr.ib" def is_decorated_with_attrs( - node, decorator_names=('attr.s', 'attr.attrs', 'attr.attributes')): + node, decorator_names=("attr.s", "attr.attrs", "attr.attributes") +): """Return True if a decorated node has an attr decorator applied.""" if not node.decorators: @@ -49,12 +50,11 @@ def attr_attributes_transform(node): rhs_node = astroid.Unknown( lineno=cdefbodynode.lineno, col_offset=cdefbodynode.col_offset, - parent=cdefbodynode + parent=cdefbodynode, ) node.locals[target.name] = [rhs_node] MANAGER.register_transform( - astroid.ClassDef, - attr_attributes_transform, - is_decorated_with_attrs) + astroid.ClassDef, attr_attributes_transform, is_decorated_with_attrs +) |