mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 14:04:26 +08:00
evaluation -> type inference and a few similar changes
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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::
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Functions evaluating the syntax tree.
|
||||
Functions inferring the syntax tree.
|
||||
"""
|
||||
import copy
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user