forked from VimPlug/jedi
fix last few glitches in NameFinder
This commit is contained in:
@@ -186,10 +186,9 @@ class Evaluator(object):
|
|||||||
this completion.
|
this completion.
|
||||||
|
|
||||||
:param position: Position of the last statement -> tuple of line, column
|
:param position: Position of the last statement -> tuple of line, column
|
||||||
:return: List of Names. Their parents are the scopes, they are defined in.
|
:return: List of Names. Their parents are the types.
|
||||||
:rtype: list
|
|
||||||
"""
|
"""
|
||||||
f = finder.NameFinder(self, scope, name_str, position, is_goto)
|
f = finder.NameFinder(self, scope, name_str, position)
|
||||||
scopes = f.scopes(search_global)
|
scopes = f.scopes(search_global)
|
||||||
if is_goto:
|
if is_goto:
|
||||||
return f.filter_name(scopes, is_goto=is_goto)
|
return f.filter_name(scopes, is_goto=is_goto)
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ class NameFinder(object):
|
|||||||
c = r.expression_list()[0]
|
c = r.expression_list()[0]
|
||||||
if c in ('*', '**'):
|
if c in ('*', '**'):
|
||||||
t = 'tuple' if c == '*' else 'dict'
|
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:
|
if not r.assignment_details:
|
||||||
# this means that there are no default params,
|
# this means that there are no default params,
|
||||||
# so just ignore it.
|
# so just ignore it.
|
||||||
@@ -258,7 +258,7 @@ class NameFinder(object):
|
|||||||
|
|
||||||
def find(self, scopes, resolve_decorator=True):
|
def find(self, scopes, resolve_decorator=True):
|
||||||
filtered = self.filter_name(scopes)
|
filtered = self.filter_name(scopes)
|
||||||
return self._descriptor_check(self._remove_statements(filtered,
|
return self._resolve_descriptors(self._remove_statements(filtered,
|
||||||
resolve_decorator))
|
resolve_decorator))
|
||||||
|
|
||||||
def _check_getattr(self, inst):
|
def _check_getattr(self, inst):
|
||||||
|
|||||||
Reference in New Issue
Block a user