diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2020-03-10 10:33:35 +0100 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2020-03-10 10:33:35 +0100 |
commit | 77e205dc64ead82e38bb901e08117ef6f6162c5c (patch) | |
tree | 8fbd409badeee2ed517ba368ee521a790c0f28fd /astroid/nodes.py | |
parent | 00bcf7b817ed459ee617b8af8843aca18d72fe04 (diff) | |
download | astroid-git-77e205dc64ead82e38bb901e08117ef6f6162c5c.tar.gz |
Add a new EvaluatedObject container
This container is used to store values that have already been evaluated.
For instance, 79d5a3a783cf0b5a729e4e467508e955a0cca55f added support
for inferring `tuple()` call arguments, but as a result, the `elts` of a `Tuple`
can be objects not *references*. As a result, `Tuple.elts` can contain class objects
rather than references (names) to class object. The `EvaluatedObject` helps with that,
as we still have to call `.infer()` (albeit a no-op) to grab the inferred value of an element.
Diffstat (limited to 'astroid/nodes.py')
-rw-r--r-- | astroid/nodes.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/astroid/nodes.py b/astroid/nodes.py index bf6911ac..82f425ca 100644 --- a/astroid/nodes.py +++ b/astroid/nodes.py @@ -86,6 +86,7 @@ from astroid.node_classes import ( # Node not present in the builtin ast module. DictUnpack, Unknown, + EvaluatedObject, ) from astroid.scoped_nodes import ( Module, |