1
0
forked from VimPlug/jedi

Fix an issue with classes and decorators combined.

This commit is contained in:
Dave Halter
2014-10-24 00:41:26 +02:00
parent 3bdd32ad87
commit 93c97a78a3
2 changed files with 2 additions and 1 deletions

View File

@@ -82,7 +82,7 @@ class Parser(object):
arr = self.scope_names_stack[-1].setdefault(new_node.value, [])
arr.append(new_node)
elif isinstance(new_node, pr.ClassOrFunc) \
and raw_node[0] == pytree.python_symbols.compound_stmt:
and raw_node[0] in (pytree.python_symbols.funcdef, pytree.python_symbols.funcdef):
# scope_name_stack handling
n = new_node.name
scope_names = self.scope_names_stack.pop()

View File

@@ -266,6 +266,7 @@ class Something():
def x(self, a, b=1):
return a
#? int()
Something().x(1)