-
-
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
False positive E1111 assignment-from-no-return #2435
Comments
Thanks for reporting the issue! This is happening because the brain functions we have for numpy don't return anything, which confuses this check. Also agree on the fact that the message is cryptic, going to update it to something easier to understand. |
This happens also with numpy's
pylint says pip freeze:
|
This is fixed in the master branch of astroid, just found out it's a duplicate of #2694 which was closed just today. |
I'm getting false positives E1111 assignment-from-no-return from pylint for this project: https://github.com/gammapy/gammapy
Here's a minimal example to reproduce:
The error reported is this:
The E1111 is a false positive,
c.flatten()
does return:This is for current astroid and pylint master, which reports like this:
It's weird that the same false positive doesn't appear for the equivalent
a.flatten()
call.Also, the message is cryptic:
I'm not assigning to a function call.
I'm making a function call
c.flatten()
and assign the return value to a local variabled
.The text was updated successfully, but these errors were encountered: