-
-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compare node inferring #846
Labels
Enhancement ✨
Improvement to a component
Milestone
Comments
@usagitoneko97 it is indeed surprising. Maybe @PCManticore or @AWhetter will have an answer? |
nelfin
added a commit
to nelfin/astroid
that referenced
this issue
Apr 29, 2021
Ref pylint-dev#846. Identity checks are currently Uninferable as there is no sensible way to infer that two Instances refer to the same object without accurately modelling control flow.
nelfin
added a commit
to nelfin/astroid
that referenced
this issue
Apr 29, 2021
Ref pylint-dev#846. Identity checks are currently Uninferable as there is no sensible way to infer that two Instances refer to the same object without accurately modelling control flow.
nelfin
added a commit
to nelfin/astroid
that referenced
this issue
Aug 18, 2021
Ref pylint-dev#846. Identity checks are currently Uninferable as there is no sensible way to infer that two Instances refer to the same object without accurately modelling control flow.
nelfin
added a commit
to nelfin/astroid
that referenced
this issue
Aug 18, 2021
Ref pylint-dev#846. Identity checks are currently Uninferable as there is no sensible way to infer that two Instances refer to the same object without accurately modelling control flow.
nelfin
added a commit
to nelfin/astroid
that referenced
this issue
Aug 27, 2021
Ref pylint-dev#846. Identity checks are currently Uninferable as there is no sensible way to infer that two Instances refer to the same object without accurately modelling control flow.
nelfin
added a commit
to nelfin/astroid
that referenced
this issue
Aug 27, 2021
Ref pylint-dev#846. Identity checks are currently Uninferable as there is no sensible way to infer that two Instances refer to the same object without accurately modelling control flow.
Pierre-Sassoulas
added a commit
that referenced
this issue
Sep 14, 2021
* Add inference for Compare nodes Ref #846. Identity checks are currently Uninferable as there is no sensible way to infer that two Instances refer to the same object without accurately modelling control flow. Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This might be obvious, but I can't find any issue on compare node inferring. I maybe wrong here. but I thought that it will be a straight forward implementation, similar to
binop
implementation. Perhaps because of multiple comparators complicate things?Steps to reproduce
from astroid.builder import parse
module = parse(
"""
x = 1 > 2
"""
)
inferred = next(module["x"].infer())
print(inferred)
Current behavior
Uninferable
Expected behavior
False
constpython -c "from astroid import __pkginfo__; print(__pkginfo__.version)"
output2.5.0
The text was updated successfully, but these errors were encountered: