1
0
forked from VimPlug/jedi

eval_ -> infer_

This commit is contained in:
Dave Halter
2019-08-15 00:20:01 +02:00
parent 199799a966
commit 8157d119a7
23 changed files with 149 additions and 149 deletions

View File

@@ -10,7 +10,7 @@ from parso.python import tree
from jedi._compatibility import u, Parameter
from jedi.inference.base_context import NO_CONTEXTS
from jedi.inference.syntax_tree import eval_atom
from jedi.inference.syntax_tree import infer_atom
from jedi.inference.helpers import infer_call_of_leaf
from jedi.inference.compiled import get_string_context_set
from jedi.cache import call_signature_time_cache
@@ -146,13 +146,13 @@ def infer_goto_definition(evaluator, context, leaf):
definitions = NO_CONTEXTS
if parent.type == 'atom':
# e.g. `(a + b)`
definitions = context.eval_node(leaf.parent)
definitions = context.infer_node(leaf.parent)
elif parent.type == 'trailer':
# e.g. `a()`
definitions = infer_call_of_leaf(context, leaf)
elif isinstance(leaf, tree.Literal):
# e.g. `"foo"` or `1.0`
return eval_atom(context, leaf)
return infer_atom(context, leaf)
elif leaf.type in ('fstring_string', 'fstring_start', 'fstring_end'):
return get_string_context_set(evaluator)
return definitions