-
-
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
Rename unneeded-not
to unnecessary-negation
for clarity
#8846
Rename unneeded-not
to unnecessary-negation
for clarity
#8846
Conversation
This comment has been minimized.
This comment has been minimized.
β¦o fix-unneeded-not
for more information, see https://pre-commit.ci
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #8846 +/- ##
==========================================
- Coverage 95.88% 95.74% -0.14%
==========================================
Files 173 173
Lines 18548 18557 +9
==========================================
- Hits 17785 17768 -17
- Misses 763 789 +26
|
This comment has been minimized.
This comment has been minimized.
.gitignore
Outdated
@@ -4,6 +4,7 @@ | |||
/log | |||
*.py[cod] | |||
/build | |||
/venv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use a global gitignore for that :)
"""This is also ok""" | ||
def __ne__(self, other): | ||
return not self == other | ||
"""Check exceeding negations in boolean expressions trigger warnings""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's strange that everything changed here, probably due to modified end of line (\r\n
vs \n
). Could you revert to the original line ending ? It preservs the git blame and we need some diversity in line ending in some of the tests which is why it's not uniformized with a .gitattributes
:)
This comment has been minimized.
This comment has been minimized.
unneeded-not
to unnecessary-negation
for clarity
Thanks for the contribution @gracejiang16! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, thank you !
@@ -0,0 +1,3 @@ | |||
Renamed the "unneeded-not" error into "unnecessary_negation" to be clearer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed the "unneeded-not" error into "unnecessary_negation" to be clearer. | |
Renamed the "unneeded-not" error into "unnecessary-negation" because it can be raised on comparators too (in a context where the `not` keyword is not used). |
Rename 'unneeded-not' to 'unnecessary-negation.' Deprecate old name.
Type of Changes
Description
Closes #8789