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
False positive finding for E0605: Invalid format for __all__ #4711
Comments
So I did some troubleshooting. The type of the list at pylint time is So, the check fails here: https://github.com/PyCQA/pylint/blob/741276e90a3698c8bf5ac621669453b67b7c2c7c/pylint/checkers/variables.py#L2013 |
If I understand what you're saying the fix could be : |
I guess that could be the fix 😄 . Let me give it a try |
@Pierre-Sassoulas bad new, still not fixed. I'm not sure, but it seems, that these "_valid_x.py" files are not running in the tests at all. Can you please check. Also , the module name of the finding is false:
The module |
Thank you for finding that bug with the bad node being given. The valid_x file are all being executed but the example given in this issue is not tested in it. It's still giving:
See #4953 |
Thanks a lot for the quick help and the PR. It would be great to see this in a 2.10.x release 😄 A quick question: The line number seems to be wring, too. Shouldn't it be 7? |
The PR is fixing the bad node but not yet the false positive. It's a basis for working on it :) |
So, the actual type is an astroid instance object which represents |
You're right, I also handled tuple the same way. |
Great 😄 |
Steps to reproduce
Given a file
__init__.py
:Current behavior
Result of
pylint __init__.py
:Expected behavior
No finding. The attribute is a list at runtime but I guess the check doesn't see this
pylint --version output
Result of
pylint --version
output:The text was updated successfully, but these errors were encountered: