1
0
forked from VimPlug/jedi

fix last few glitches in NameFinder

This commit is contained in:
Dave Halter
2014-01-06 13:26:00 +01:00
parent 7e874f8c9f
commit 0a87f8b02f
2 changed files with 4 additions and 5 deletions

View File

@@ -186,10 +186,9 @@ class Evaluator(object):
this completion.
:param position: Position of the last statement -> tuple of line, column
:return: List of Names. Their parents are the scopes, they are defined in.
:rtype: list
:return: List of Names. Their parents are the types.
"""
f = finder.NameFinder(self, scope, name_str, position, is_goto)
f = finder.NameFinder(self, scope, name_str, position)
scopes = f.scopes(search_global)
if is_goto:
return f.filter_name(scopes, is_goto=is_goto)

View File

@@ -79,7 +79,7 @@ class NameFinder(object):
c = r.expression_list()[0]
if c in ('*', '**'):
t = 'tuple' if c == '*' else 'dict'
res_new = evaluator.execute(self.find_name(builtin.Builtin.scope, t)[0])
res_new = evaluator.execute(evaluator.find_name(builtin.Builtin.scope, t)[0])
if not r.assignment_details:
# this means that there are no default params,
# so just ignore it.
@@ -258,7 +258,7 @@ class NameFinder(object):
def find(self, scopes, resolve_decorator=True):
filtered = self.filter_name(scopes)
return self._descriptor_check(self._remove_statements(filtered,
return self._resolve_descriptors(self._remove_statements(filtered,
resolve_decorator))
def _check_getattr(self, inst):