-
Notifications
You must be signed in to change notification settings - Fork 750
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
Allow noqa for all line checks #480
Comments
I already have plans for this + something fancier in Flake8 3.0. pep8 might be able to piggy-back off of that once I've released it instead of anyone needing to work on it in here. |
Awesome! 👍 |
@sigmavirus24 did you ever wind up doing this for flake8? 3.3.0 seems to ignore many / most In our use case, we have a big body of code with pep8 errors and will eventually audit it but at the moment we want to ignore many existing violations without letting new violations of the same category slide. |
@jaredj Are you looking for http://flake8.pycqa.org/en/latest/user/violations.html#in-line-ignoring-errors ? |
@sigmavirus24 I am, but with flake8 3.3.0, after adding all the lines, only a small subset of errors are ignored; about 3,400 out of 3,800 errors still show up. I thought this was expected behavior based on #180 |
Are you using Flake8 or pycodestyle? Flake8 will ignore them. pycodestyle doesn't have that level of support |
Any updates on this topic? |
@danie1k Flake8 has support to |
Sooo, in 2021 approaching 2022 is it possible to do something like: print("Hi pycodestyle", "please ignore E241 warning on this specific line") # noqa: E241
# ^^^ I cannot find this in the documentation? And currently this doesn't seem to work :( |
If you're using Flake8, that works perfectly, yes. |
Up front, there has been a lot of discussion about this topic in issues (including but not limited to): #28 #180 #231 #376 #381 #472.
With the two largest types of responses having been: "yes this definitely needs to be a feature" and "users should not add this much noise to their code".
I've thought about it quite a bit, and I believe that as a tool, it should be up to the user / developer to decide when it is appropriate to use these disables. Therefore I am creating this issue as a target to produce a pull request allowing noqa for any lines in a file / for all classes of errors, and will be closing the other issues which have (at least generally) not produced pull requests.
Note that at a minimum, any pull request being considered should: pass all the tests, update the documentation accordingly, add no additional dependencies, and add no significant overhead to the performance of the code. With the stickiness of this issue, and the variety of feelings on the matter, expect that any proposed pull requests will likely get a good deal of scrutiny.
The text was updated successfully, but these errors were encountered: