1
0
forked from VimPlug/jedi

Correct global name issues.

This commit is contained in:
Dave Halter
2015-01-08 01:19:07 +01:00
parent f5e687bc22
commit 83a94c12c9
5 changed files with 27 additions and 5 deletions

View File

@@ -147,7 +147,7 @@ class Parser(object):
# We need to check raw_node always, because the same node can be
# returned by convert multiple times.
if symbol == 'global_stmt':
self.global_names += new_node.get_defined_names()
self.global_names += new_node.get_global_names()
elif isinstance(new_node, pt.Lambda):
new_node.names_dict = self.scope_names_stack.pop()
elif isinstance(new_node, (pt.ClassOrFunc, pt.Module)) \

View File

@@ -1128,6 +1128,9 @@ class GlobalStmt(KeywordStatement):
__slots__ = ()
def get_defined_names(self):
return []
def get_global_names(self):
return self.children[1::2]