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