-
-
Notifications
You must be signed in to change notification settings - Fork 276
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
Instance attributes defined in parent classes can raise InferenceError #932
Milestone
Comments
nelfin
added a commit
to nelfin/astroid
that referenced
this issue
Apr 7, 2021
Ref pylint-dev#932. The cause of this appears to be failing to specify the lookupname on the inference context in BaseInstance.igetattr. Additionally, the context path key was not set in a manner that matched other usages. This appears to date back to at least 2015 when context path keys were changed. The usage as a tuple instead of a node with implict lookupname was changed last in 3d342e8 but the lookup key was preserved throughout various changes since then.
2 tasks
nelfin
added a commit
to nelfin/astroid
that referenced
this issue
Apr 7, 2021
Ref pylint-dev#932. The cause of this appears to be failing to specify the lookupname on the inference context in BaseInstance.igetattr. Additionally, the context path key was not set in a manner that matched other usages. This appears to date back to at least 2015 when context path keys were changed. The usage as a tuple instead of a node with implict lookupname was changed last in 3d342e8 but the lookup key was preserved throughout various changes since then.
nelfin
added a commit
to nelfin/astroid
that referenced
this issue
Apr 8, 2021
Ref pylint-dev#932. The cause of this appears to be failing to specify the lookupname on the inference context in BaseInstance.igetattr. Additionally, the context path key was not set in a manner that matched other usages. This appears to date back to at least 2015 when context path keys were changed. The usage as a tuple instead of a node with implict lookupname was changed last in 3d342e8 but the lookup key was preserved throughout various changes since then.
nelfin
added a commit
to nelfin/astroid
that referenced
this issue
May 12, 2021
Ref pylint-dev#932. The cause of this appears to be failing to specify the lookupname on the inference context in BaseInstance.igetattr. Additionally, the context path key was not set in a manner that matched other usages. This appears to date back to at least 2015 when context path keys were changed. The usage as a tuple instead of a node with implict lookupname was changed last in 3d342e8 but the lookup key was preserved throughout various changes since then.
nelfin
added a commit
to nelfin/astroid
that referenced
this issue
May 12, 2021
Ref pylint-dev#932. The cause of this appears to be failing to specify the lookupname on the inference context in BaseInstance.igetattr. Additionally, the context path key was not set in a manner that matched other usages. This appears to date back to at least 2015 when context path keys were changed. The usage as a tuple instead of a node with implict lookupname was changed last in 3d342e8 but the lookup key was preserved throughout various changes since then.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to reproduce
Inferring an attribute on a class instance where the instance attribute is defined in a base class will fail, but
inferring that same attribute via
igetattr
on anastroid.Instance
will succeed.Discovered while debugging #904. I couldn't find an exact match for this issue before, but probably pylint-dev/pylint#960 is the same issue.
Current behavior
As above
Expected behavior
Inferring attribute should return
Const.int(value=123)
python -c "from astroid import __pkginfo__; print(__pkginfo__.version)"
output2.6.0-dev0
The text was updated successfully, but these errors were encountered: