forked from VimPlug/jedi
goto shouldn't call names_to_types
This commit is contained in:
@@ -191,7 +191,7 @@ class Evaluator(object):
|
|||||||
f = finder.NameFinder(self, scope, name_str, position)
|
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.names_to_types(f.filter_name(scopes, is_goto=is_goto))
|
return f.filter_name(scopes, is_goto=is_goto)
|
||||||
return f.find(scopes, resolve_decorator)
|
return f.find(scopes, resolve_decorator)
|
||||||
|
|
||||||
@memoize_default(default=(), evaluator_is_first_arg=True)
|
@memoize_default(default=(), evaluator_is_first_arg=True)
|
||||||
|
|||||||
@@ -231,6 +231,10 @@ class NameFinder(object):
|
|||||||
if result:
|
if result:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
if not result and isinstance(self.scope, er.Instance):
|
||||||
|
# __getattr__ / __getattribute__
|
||||||
|
result += self._check_getattr(self.scope)
|
||||||
|
|
||||||
debug.dbg('sfn filter "%s" in (%s-%s): %s@%s'
|
debug.dbg('sfn filter "%s" in (%s-%s): %s@%s'
|
||||||
% (self.name_str, self.scope, nscope, u(result), self.position))
|
% (self.name_str, self.scope, nscope, u(result), self.position))
|
||||||
return result
|
return result
|
||||||
@@ -248,10 +252,6 @@ class NameFinder(object):
|
|||||||
break
|
break
|
||||||
flow_scope = flow_scope.parent
|
flow_scope = flow_scope.parent
|
||||||
|
|
||||||
if not result and isinstance(self.scope, er.Instance):
|
|
||||||
# __getattr__ / __getattribute__
|
|
||||||
result += self._check_getattr(self.scope)
|
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def _check_getattr(self, inst):
|
def _check_getattr(self, inst):
|
||||||
|
|||||||
Reference in New Issue
Block a user