forked from VimPlug/jedi
Clarify inner workings of Evaluator.goto
This commit is contained in:
@@ -322,16 +322,16 @@ class Evaluator(object):
|
|||||||
def goto(self, stmt, call_path):
|
def goto(self, stmt, call_path):
|
||||||
scope = stmt.get_parent_scope()
|
scope = stmt.get_parent_scope()
|
||||||
pos = stmt.start_pos
|
pos = stmt.start_pos
|
||||||
call_path, search_name_part = call_path[:-1], call_path[-1]
|
first_part, search_name_part = call_path[:-1], call_path[-1]
|
||||||
|
|
||||||
if call_path:
|
if first_part:
|
||||||
scopes = self.eval_call_path(iter(call_path), scope, pos)
|
scopes = self.eval_call_path(iter(first_part), scope, pos)
|
||||||
search_global = False
|
search_global = False
|
||||||
pos = None
|
pos = None
|
||||||
else:
|
else:
|
||||||
# TODO does this exist? i don't think so
|
|
||||||
scopes = [scope]
|
scopes = [scope]
|
||||||
search_global = True
|
search_global = True
|
||||||
|
|
||||||
follow_res = []
|
follow_res = []
|
||||||
for s in scopes:
|
for s in scopes:
|
||||||
follow_res += self.find_types(s, search_name_part, pos,
|
follow_res += self.find_types(s, search_name_part, pos,
|
||||||
|
|||||||
Reference in New Issue
Block a user