evaluation -> type inference and a few similar changes

This commit is contained in:
Dave Halter
2019-08-12 10:13:23 +02:00
parent 4619552589
commit 9cc3b18d52
5 changed files with 5 additions and 5 deletions

View File

@@ -15,7 +15,7 @@ Type inference of Python code in |jedi| is based on three assumptions:
The actual algorithm is based on a principle I call lazy type inference. That
said, the typical entry point for static analysis is calling
``eval_expr_stmt``. There's separate logic for autocompletion in the API, the
evaluator is all about evaluating an expression.
evaluator is all about inferring an expression.
TODO this paragraph is not what jedi does anymore, it's similar, but not the
same.

View File

@@ -1,5 +1,5 @@
"""
This module is responsible for evaluating *args and **kwargs for signatures.
This module is responsible for inferring *args and **kwargs for signatures.
This means for example in this case::

View File

@@ -1,5 +1,5 @@
"""
Functions evaluating the syntax tree.
Functions inferring the syntax tree.
"""
import copy

View File

@@ -30,7 +30,7 @@ def get_executable_nodes(node, last_added=False):
if last_added is False and node.parent.type != 'param' and next_leaf != '=':
result.append(node)
elif typ == 'expr_stmt':
# I think evaluating the statement (and possibly returned arrays),
# I think inferring the statement (and possibly returned arrays),
# should be enough for static analysis.
result.append(node)
for child in node.children:

View File

@@ -427,7 +427,7 @@ def collections_namedtuple(obj, arguments, callback):
Implementation of the namedtuple function.
This has to be done by processing the namedtuple class template and
evaluating the result.
inferring the result.
"""
evaluator = obj.evaluator