-
Notifications
You must be signed in to change notification settings - Fork 176
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
Better noqa interpretation #717
Conversation
e04e7c3
to
65a4641
Compare
So as I see it, it'll maintain the same behaviour (<-- I use British spelling because I am, but I won't moan about the changes in the docs 😛) for the most part. Tools with their own syntax will do what they used to do, #noqa is still a blanket "ignore this line". There is new syntax which is prospector-specific of |
|
@Pierre-Sassoulas what you say is probably true, but I think that having a test that the ignored is really use is an added value, And I can do it only I'm sure that I receive the message and with Ruff it's not the case. If you still be against that, I will remove it :-) |
It's possible to do both Ruff style or '# Noqa: atool: F408' style, so if you're going to use the atool: style it you might as well add it :) |
@Pierre-Sassoulas Yes It's effectively what I do in this pull request, just with a different syntax, |
I was arguing that ruff style without giving the tool ( |
Ok, I will suppress that, but we lost the possibility to be notified on unused ignore :-( |
I don't think it's a problem to be able to do both |
- To completely ignore a line the `# noqa` should be alone - To ignore a code we can use `# noqa: <code>` ad ruff do
@Pierre-Sassoulas any review? |
Description
# noqa
should be alone# noqa: <code>
ad ruff do# noqa: <source>.<code>
, this will also create an error if the ignored is not used.Alternative of #714
Related Issue
Motivation and Context
How Has This Been Tested?
Test added
Types of changes