-
-
Notifications
You must be signed in to change notification settings - Fork 309
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
file-level noqa should raise an error if specific errors are provided (to avoid confusion) #1793
Comments
given how much people were mad at 6.0 pointing out a common mistake I'm hesitant. I don't need another 2 weeks of needing to lock down the issue tracker while people scream at me in my email |
I understand the hesitation then 😬. Thanks for the quick feedback and for your efforts in Python's ecosystem 🚀 |
the "simplest" fix for this would be to slap a |
I almost feel like there needs to be a "mode" for linting people's use of flake8. Like |
@sigmavirus24 you can suggest it for https://github.com/PyCQA/flake8-bugbear |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
chatgpt is hot garbage |
As a reminder to people saying "we should just do it" you are given software AS IS per the license. Unless you're maintaining the software, "just do it" isn't a justification. Please read https://blog.ian.stapletoncordas.co/2023/11/no-should-be-your-default before spewing that mentality around other projects |
how did you install flake8?
pip install flake8
unmodified output of
flake8 --bug-report
describe the problem
what I expected to happen
I'm seeing developers using the file-level-noqa ignore wrongly from time to time, providing specific errors like
# flake8: noqa: E712
. What's confusing is that it gives the impression that it works as it doesn't throw that error anymore but the developers' understanding is incorrect (all errors are ignore). I understood that you don't want to support the file-level-specific-ignores but I think flake8 should do something to prevent this confusion.See for instance https://til.codeinthehole.com/posts/filelevel-flake8-comments-ignore-all-errors/
My suggestion would be to detect that and throw an error? Somehow it is like providing a flake8 config with a wrong format
sample code
Let me know what you think, happy to work on this if you would welcome a PR
The text was updated successfully, but these errors were encountered: