summaryrefslogtreecommitdiff
path: root/astroid/brain/brain_attrs.py
diff options
context:
space:
mode:
authorAhmed Azzaoui <ahmed.azzaoui@engie.com>2018-01-17 17:06:22 +0100
committerClaudiu Popa <pcmanticore@gmail.com>2018-01-18 11:23:58 +0100
commitd768d7f3528749f8caae9fab6776617421bb7b84 (patch)
tree4e2bcecdfd68d83056824ce9144115b634b3280e /astroid/brain/brain_attrs.py
parente260d5ce84c3dea5c0e94e9e3139b0b768d44e22 (diff)
downloadastroid-git-d768d7f3528749f8caae9fab6776617421bb7b84.tar.gz
handle case of "attr" decorators with arguments
Diffstat (limited to 'astroid/brain/brain_attrs.py')
-rw-r--r--astroid/brain/brain_attrs.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/astroid/brain/brain_attrs.py b/astroid/brain/brain_attrs.py
index ed27e609..2ad32987 100644
--- a/astroid/brain/brain_attrs.py
+++ b/astroid/brain/brain_attrs.py
@@ -21,6 +21,8 @@ def is_decorated_with_attrs(
if not node.decorators:
return False
for decorator_attribute in node.decorators.nodes:
+ if isinstance(decorator_attribute, astroid.Call): # decorator with arguments
+ decorator_attribute = decorator_attribute.func
if decorator_attribute.as_string() in decorator_names:
return True
return False