diff --git a/jedi/api.py b/jedi/api.py index dd9ab022..12935703 100644 --- a/jedi/api.py +++ b/jedi/api.py @@ -515,7 +515,7 @@ class Script(object): user_stmt = self._user_stmt() with common.scale_speed_settings(settings.scale_call_signatures): - _callable = lambda: self._evaluator.follow_call(call) + _callable = lambda: self._evaluator.eval_call(call) origins = cache.cache_call_signatures(_callable, user_stmt) debug.speed('func_call followed') diff --git a/jedi/evaluate/__init__.py b/jedi/evaluate/__init__.py index 4c227751..4b12d9e3 100644 --- a/jedi/evaluate/__init__.py +++ b/jedi/evaluate/__init__.py @@ -30,15 +30,15 @@ To *visualize* this (simplified): - ``eval_statement`` - ```` - Unpacking of the statement into ``[[]]`` -- ``follow_call_list``, calls ``follow_call`` with ```` -- ``follow_call`` - searches the ``datetime`` name within the module. +- ``follow_call_list``, calls ``eval_call`` with ```` +- ``eval_call`` - searches the ``datetime`` name within the module. This is exactly where it starts to get complicated. Now recursions start to kick in. The statement has not been resolved fully, but now we need to resolve the datetime import. So it continues - follow import, which happens in the :mod:`imports` module. -- now the same ``follow_call`` as above calls ``follow_paths`` to follow the +- now the same ``eval_call`` as above calls ``follow_paths`` to follow the second part of the statement ``date``. - After ``follow_paths`` returns with the desired ``datetime.date`` class, the result is being returned and the recursion finishes. @@ -562,7 +562,7 @@ class Evaluator(object): if str(call.name) == 'else': break continue - result += self.follow_call(call) + result += self.eval_call(call) elif call == '*': if [r for r in result if isinstance(r, er.Array) or isinstance(r, er.Instance) @@ -571,7 +571,7 @@ class Evaluator(object): next(calls_iterator) return set(result) - def follow_call(self, call): + def eval_call(self, call): """Follow a call is following a function, variable, string, etc.""" path = call.generate_call_path() @@ -630,7 +630,7 @@ class Evaluator(object): foo.bar.baz `follow_path` is only responsible for completing `.bar.baz`, the rest is - done in the `follow_call` function. + done in the `eval_call` function. """ # current is either an Array or a Scope. try: diff --git a/jedi/evaluate/dynamic.py b/jedi/evaluate/dynamic.py index d59f6622..d648a006 100644 --- a/jedi/evaluate/dynamic.py +++ b/jedi/evaluate/dynamic.py @@ -486,7 +486,7 @@ def _check_isinstance_type(evaluator, stmt, search_name): return [] result = [] - for c in evaluator.follow_call(classes[0]): + for c in evaluator.eval_call(classes[0]): if isinstance(c, er.Array): result += c.get_index_types() else: