forked from VimPlug/jedi
Fixed global variables.
This commit is contained in:
@@ -595,7 +595,7 @@ class Parser(object):
|
|||||||
self._scope.add_statement(kw)
|
self._scope.add_statement(kw)
|
||||||
if stmt is not None and tok_str == 'global':
|
if stmt is not None and tok_str == 'global':
|
||||||
for t in stmt._token_list:
|
for t in stmt._token_list:
|
||||||
if isinstance(t, pr.Name):
|
if isinstance(t, pr.NamePart):
|
||||||
# Add the global to the top module, it counts there.
|
# Add the global to the top module, it counts there.
|
||||||
self.module.add_global(t)
|
self.module.add_global(t)
|
||||||
# decorator
|
# decorator
|
||||||
|
|||||||
Reference in New Issue
Block a user