summaryrefslogtreecommitdiff
path: root/rebuilder.py
diff options
context:
space:
mode:
authorEmile Anclin <emile.anclin@logilab.fr>2010-12-01 10:31:34 +0100
committerEmile Anclin <emile.anclin@logilab.fr>2010-12-01 10:31:34 +0100
commitd038ae380bfd3291aa2ceddc9f1eb365e2fb3942 (patch)
treecab04106defd3caf8b557c0c6b9595b1aed775e4 /rebuilder.py
parent9ff3beb68314ade13fa58f3e67c97b0ed00abd31 (diff)
downloadastroid-git-d038ae380bfd3291aa2ceddc9f1eb365e2fb3942.tar.gz
cleanup: just define "extra_decorators" in Function constructor
Diffstat (limited to 'rebuilder.py')
-rw-r--r--rebuilder.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/rebuilder.py b/rebuilder.py
index ea7e9848..f0f877d7 100644
--- a/rebuilder.py
+++ b/rebuilder.py
@@ -293,10 +293,7 @@ class TreeRebuilder(RebuildVisitor):
if isinstance(meth, new.Function):
if func_name in ('classmethod', 'staticmethod'):
meth.type = func_name
- try: # XXX use setdefault ?
- meth.extra_decorators.append(newnode.value)
- except AttributeError:
- meth.extra_decorators = [newnode.value]
+ meth.extra_decorators.append(newnode.value)
except (AttributeError, KeyError):
continue
elif getattr(newnode.targets[0], 'name', None) == '__metaclass__':