-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
AttributeError: 'Call' object has no attribute 'name' #4837
Comments
Thank you for taking the time to report this. Love the example with default pink ponyz. |
gtristan
added a commit
to apache/buildstream
that referenced
this issue
Aug 13, 2021
…systems This also removes the `pytest-pip8` and `pytest-pylint` pytest plugin dependencies, as we will be adopting the strategy from master and running the linter directly instead from now on. We now pin pylint at version 2.8.3, due to an upstream pylint crash introduced in 2.9.x, see: #1496 pylint-dev/pylint#4837
Pierre-Sassoulas
added a commit
to Pierre-Sassoulas/pylint
that referenced
this issue
Aug 15, 2021
It was already fixed in master, we need to release 2.10.0.
Pierre-Sassoulas
added a commit
that referenced
this issue
Aug 15, 2021
gtristan
added a commit
to apache/buildstream
that referenced
this issue
Aug 16, 2021
…systems This also removes the `pytest-pip8` and `pytest-pylint` pytest plugin dependencies, as we will be adopting the strategy from master and running the linter directly instead from now on. We now pin pylint at version 2.8.3, due to an upstream pylint crash introduced in 2.9.x, see: #1496 pylint-dev/pylint#4837
gtristan
added a commit
to apache/buildstream
that referenced
this issue
Aug 18, 2021
…systems This also removes the `pytest-pip8` and `pytest-pylint` pytest plugin dependencies, as we will be adopting the strategy from master and running the linter directly instead from now on. We now pin pylint at version 2.8.3, due to an upstream pylint crash introduced in 2.9.x, see: #1496 pylint-dev/pylint#4837
gtristan
added a commit
to apache/buildstream
that referenced
this issue
Aug 24, 2021
This was referenced Aug 24, 2021
jjardon
pushed a commit
to jjardon/buildstream-1
that referenced
this issue
Jan 7, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug description
This is similar but distinct from issue #4439.
Here is a reduced test case, I was able to concoct this after running
pylint
with modifiedcheckers/classes.py
and tracing the asteroid nodes being checked in_check_unused_private_attributes()
.Possible fix
I think the crash is essentially caused by
NodeNG.node_of_classes()
yielding attributes passed through function calls, and it seems that pylint's_check_unused_private_attributes()
is unprepared for this outcome.The yielded
astroid.AssignAttr
andastroid.Attribute
should have the type of theexpr
object checked before expecting the expression to be a named expression.Command used
Pylint output
Here is the stack trace generated by linting the test case:
Expected behavior
No crash, properly report if private class attributes are unused.
Pylint version
pylint 2.9.6 astroid 2.6.6 Python 3.9.2 (default, Feb 28 2021, 17:03:44) I've also tested this with python 3.8 and had the same results.
OS / Environment
I've seen this on fedora 32 and on debian 11.
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: