-
-
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
Merge use implicit booleaness like checks #8630
Merge use implicit booleaness like checks #8630
Conversation
This comment has been minimized.
This comment has been minimized.
838d8ff
to
6f0ddf6
Compare
- ``compare-to-zero`` was renamed ``use-implicit-booleaness-not-comparison-to-zero`` | ||
and ``compare-to-empty-string`` was renamed ``use-implicit-booleaness-not-comparison-to-string`` | ||
and they now need to be enabled explicitly. | ||
- The `pylint.extensions.emptystring`` and ``pylint.extensions.compare-to-zero`` extensions no longer exists and | ||
needs to be removed from the ``load-plugins`` option. |
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.
Really considering to make an update tool for configuration files, it's not a lot of work and will permit to make breaking changes with more serenity.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #8630 +/- ##
==========================================
- Coverage 95.81% 95.81% -0.01%
==========================================
Files 174 172 -2
Lines 18337 18309 -28
==========================================
- Hits 17570 17542 -28
Misses 767 767
|
d3447c5
to
c484c72
Compare
@@ -70,6 +80,21 @@ class ImplicitBooleanessChecker(checkers.BaseChecker): | |||
"used to check for emptiness; Use implicit booleaness instead " | |||
"of a collection classes; empty collections are considered as false", | |||
), | |||
"C1804": ( | |||
'"%s" can be simplified to "%s" as an empty string is falsey', | |||
"use-implicit-booleaness-not-comparison-to-string", |
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.
"use-implicit-booleaness-not-comparison-to-string", | |
"consider-implicit-booleaness-str", |
doc/data/messages/u/use-implicit-booleaness-not-comparison-to-string/details.rst
Outdated
Show resolved
Hide resolved
doc/data/messages/u/use-implicit-booleaness-not-comparison-to-zero/good.py
Outdated
Show resolved
Hide resolved
5f65700
to
7fa78c3
Compare
7fa78c3
to
2526ec9
Compare
Type of Changes
Description
First step before #6870 and following #8592, just merging without modifying the messages or optimizing anything for now to make it more reviewable and validating the premises.
Refs #6871 #6870