forked from VimPlug/jedi
Start using names_dicts for completion as well.
This commit is contained in:
@@ -242,23 +242,10 @@ class Script(object):
|
||||
for s in scopes:
|
||||
if s.isinstance(er.Function):
|
||||
names = s.get_magic_function_names()
|
||||
elif isinstance(s, imports.ImportWrapper):
|
||||
under = like + self._user_context.get_path_after_cursor()
|
||||
if under == 'import':
|
||||
current_line = self._user_context.get_position_line()
|
||||
if not current_line.endswith('import import'):
|
||||
continue
|
||||
"""
|
||||
a = s.import_stmt.alias
|
||||
if a and a.start_pos <= self._pos <= a.end_pos:
|
||||
continue
|
||||
"""
|
||||
# TODO what to do with this?
|
||||
names = s.get_defined_names(on_import_stmt=True)
|
||||
else:
|
||||
names = []
|
||||
for _, new_names in s.scope_names_generator():
|
||||
names += new_names
|
||||
for names_dict in s.names_dicts(search_global=False):
|
||||
names += chain.from_iterable(names_dict.values())
|
||||
|
||||
for c in names:
|
||||
completions.append((c, s))
|
||||
|
||||
Reference in New Issue
Block a user