global working.
This commit is contained in:
1 parent
f3c2b4fc33
commit
13a128b160
4 files changed
+13
-3
No files matched your search
@@ -113,7 +113,7 @@ class Parser(object):
|
||||
# We need to check raw_node always, because the same node can be
|
||||
# returned by convert multiple times.
|
||||
if type == pytree.python_symbols.global_stmt:
|
||||
self.global_names += new_node.names()
|
||||
self.global_names += new_node.get_defined_names()
|
||||
elif isinstance(new_node, (pr.ClassOrFunc, pr.Module)) \
|
||||
and type in (pytree.python_symbols.funcdef,
|
||||
pytree.python_symbols.classdef,
|
||||
|
||||
@@ -1152,7 +1152,7 @@ class KeywordStatement(Simple):
|
||||
|
||||
|
||||
class GlobalStmt(Simple):
|
||||
def names(self):
|
||||
def get_defined_names(self):
|
||||
return self.children[1::2]
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user