1
0
forked from VimPlug/jedi

Start using names_dicts instead of scope_names_generator.

This commit is contained in:
Dave Halter
2015-01-01 23:27:03 +01:00
parent ed3cf5577e
commit 9de4a5479c
5 changed files with 111 additions and 14 deletions

View File

@@ -139,7 +139,7 @@ class Base(object):
Returns the underlying scope.
"""
scope = self.parent
while scope.parent is not None:
while scope is not None:
if include_flows and isinstance(scope, Flow):
return scope
if scope.is_scope():
@@ -623,6 +623,7 @@ class SubModule(Scope, Module):
"""
__slots__ = ('path', 'global_names', 'used_names', '_name',
'line_offset', 'use_as_parent', 'error_statement_stacks')
type = 'file_input'
def __init__(self, children):
"""
@@ -1259,6 +1260,9 @@ class CompFor(Simple):
arr.append(name)
return dct
def names_dicts(self):
yield self.names_dict
def get_defined_names(self):
return _defined_names(self.children[1])