summaryrefslogtreecommitdiff
path: root/astroid/brain/brain_attrs.py
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2018-10-02 09:43:56 +0200
committerClaudiu Popa <pcmanticore@gmail.com>2018-10-02 09:43:56 +0200
commitadd5f7b8eba427de9d39caae864bbc6dc37ef980 (patch)
tree86bb7df77f389062879365e97df0c3d53d38a8a6 /astroid/brain/brain_attrs.py
parentbb46cd198b93f3715da94089d42f39fc910892ff (diff)
downloadastroid-git-add5f7b8eba427de9d39caae864bbc6dc37ef980.tar.gz
Initial formatting of astroid
Diffstat (limited to 'astroid/brain/brain_attrs.py')
-rw-r--r--astroid/brain/brain_attrs.py12
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
+)