-
-
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
Refactor unneeded-not
checker
#8789
Comments
Can I try this issue? |
Yes! Do you need any pointers to start working on it? |
@gracejiang16 yeah you can. should be super simple to change. I am glad there is an agreement about the change itself |
Yes please thank you! It seems like a simple search&replace, plus adding on to the description. Do I still need to write tests for this, or would I just make a pr? |
If you need more help we could try and help |
You will also need to use the "old name" system, which we use to deprecate old names and reuse new names without breaking people's setup. You can search for "missing-docstring" to see how this works. |
I've done everything up to the townscrier note. But I've tried reading through issue#1164, if that's what you mean, and I'm still having some trouble figuring out how to proceed. Do you have any tips or pointers? Thank you again. |
@gracejiang16 - I am not familiar with Daniel's note but I think that its best if you submit a PR connected to this issue, this way we could see what you did and could have a look. |
Do not hesitate to open a merge request even if something's is not working yet. Regarding old_names here's an example: pylint/pylint/checkers/strings.py Line 662 in f815e9f
|
Current problem
A small suggestion to improve readability of this checker, since it covers not only the
not
keyword but also the!=
symbol.Also in the description, it might not be perfectly clear what a
unneeded negation
is.Desired solution
New name suggestion (or similar):
redundant-negation
The description can be extended to this:
Used when a boolean expression contains an unneeded negation, e.g. when two negation operators cancel each other out.
Additional context
No response
The text was updated successfully, but these errors were encountered: