forked from VimPlug/jedi
follow_call_path -> eval_call_path
This commit is contained in:
@@ -579,9 +579,9 @@ class Evaluator(object):
|
||||
s = call
|
||||
while not s.parent.isinstance(pr.IsScope):
|
||||
s = s.parent
|
||||
return self.follow_call_path(path, s.parent, s.start_pos)
|
||||
return self.eval_call_path(path, s.parent, s.start_pos)
|
||||
|
||||
def follow_call_path(self, path, scope, position):
|
||||
def eval_call_path(self, path, scope, position):
|
||||
"""
|
||||
Follows a path generated by `pr.StatementElement.generate_call_path()`.
|
||||
"""
|
||||
@@ -686,7 +686,7 @@ class Evaluator(object):
|
||||
pos = pos[0], pos[1] + 1
|
||||
|
||||
if call_path:
|
||||
scopes = self.follow_call_path(iter(call_path), scope, pos)
|
||||
scopes = self.eval_call_path(iter(call_path), scope, pos)
|
||||
search_global = False
|
||||
pos = None
|
||||
else:
|
||||
|
||||
@@ -160,7 +160,7 @@ def search_params(evaluator, param):
|
||||
|
||||
# this whole stuff is just to not execute certain parts
|
||||
# (speed improvement), basically we could just call
|
||||
# ``follow_call_path`` on the call_path and it would
|
||||
# ``eval_call_path`` on the call_path and it would
|
||||
# also work.
|
||||
def listRightIndex(lst, value):
|
||||
return len(lst) - lst[-1::-1].index(value) - 1
|
||||
@@ -173,7 +173,7 @@ def search_params(evaluator, param):
|
||||
continue
|
||||
scopes = [scope]
|
||||
if first:
|
||||
scopes = evaluator.follow_call_path(iter(first), scope, pos)
|
||||
scopes = evaluator.eval_call_path(iter(first), scope, pos)
|
||||
pos = None
|
||||
from jedi.evaluate import representation as er
|
||||
for scope in scopes:
|
||||
@@ -308,7 +308,7 @@ def _check_array_additions(evaluator, compare_array, module, is_list):
|
||||
position = c.start_pos
|
||||
scope = c.get_parent_until(pr.IsScope)
|
||||
|
||||
found = evaluator.follow_call_path(backtrack_path, scope, position)
|
||||
found = evaluator.eval_call_path(backtrack_path, scope, position)
|
||||
if not compare_array in found:
|
||||
continue
|
||||
|
||||
|
||||
Reference in New Issue
Block a user