diff --git a/jedi/parser/representation.py b/jedi/parser/representation.py index 0ba1e0ae..ca4b3249 100644 --- a/jedi/parser/representation.py +++ b/jedi/parser/representation.py @@ -500,7 +500,7 @@ class Scope(Simple, DocstringMixin): for element in children: if isinstance(element, typ): elements.append(element) - if is_node(element, 'suite', 'simple_stmt') \ + if is_node(element, 'suite', 'simple_stmt', 'decorated') \ or isinstance(element, Flow): elements += scan(element.children) return elements diff --git a/test/completion/decorators.py b/test/completion/decorators.py index 4cac2a75..05ba5775 100644 --- a/test/completion/decorators.py +++ b/test/completion/decorators.py @@ -121,7 +121,7 @@ class SelfVars(): @Decorator def __init__(self): """ - init decorators should be ignored when looking up variables in the + __init__ decorators should be ignored when looking up variables in the class. """ self.c = list