diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2023-04-26 21:50:45 +0200 |
---|---|---|
committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2023-05-02 20:01:39 +0200 |
commit | 918f4624d76197bec7cc54467f0281ff63c19c5a (patch) | |
tree | 1a7ca06809bff250669d6ca7faa04ab30acd0668 /doc/user_guide | |
parent | 26686d544eab7236a92e56cc90c34b6e3a37f473 (diff) | |
download | pylint-git-918f4624d76197bec7cc54467f0281ff63c19c5a.tar.gz |
Merge the empty-string extensions to 'implicit_booleaness_checker'
Diffstat (limited to 'doc/user_guide')
-rw-r--r-- | doc/user_guide/checkers/extensions.rst | 15 | ||||
-rw-r--r-- | doc/user_guide/checkers/features.rst | 4 | ||||
-rw-r--r-- | doc/user_guide/configuration/all-options.rst | 2 | ||||
-rw-r--r-- | doc/user_guide/messages/messages_overview.rst | 3 |
4 files changed, 6 insertions, 18 deletions
diff --git a/doc/user_guide/checkers/extensions.rst b/doc/user_guide/checkers/extensions.rst index f3823d715..79a797a7c 100644 --- a/doc/user_guide/checkers/extensions.rst +++ b/doc/user_guide/checkers/extensions.rst @@ -19,7 +19,6 @@ Pylint provides the following optional plugins: - :ref:`pylint.extensions.docstyle` - :ref:`pylint.extensions.dunder` - :ref:`pylint.extensions.empty_comment` -- :ref:`pylint.extensions.emptystring` - :ref:`pylint.extensions.eq_without_hash` - :ref:`pylint.extensions.for_any_all` - :ref:`pylint.extensions.magic_value` @@ -87,20 +86,6 @@ Code Style checker Messages to. This can be changed to be an augmented assign. Disabled by default! -.. _pylint.extensions.emptystring: - -Compare-To-Empty-String checker -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -This checker is provided by ``pylint.extensions.emptystring``. -Verbatim name of the checker is ``compare-to-empty-string``. - -Compare-To-Empty-String checker Messages -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -:compare-to-empty-string (C1901): *"%s" can be simplified to "%s" as an empty string is falsey* - Used when Pylint detects comparison to an empty string constant. - - .. _pylint.extensions.comparison_placement: Comparison-Placement checker diff --git a/doc/user_guide/checkers/features.rst b/doc/user_guide/checkers/features.rst index e30aff544..789d59b8b 100644 --- a/doc/user_guide/checkers/features.rst +++ b/doc/user_guide/checkers/features.rst @@ -893,8 +893,10 @@ Refactoring checker Messages Emitted when a single "return" or "return None" statement is found at the end of function or method definition. This statement can safely be removed because Python will implicitly return None -:use-implicit-booleaness-not-comparison-to-zero (C1804): *"%s" can be simplified to "%s" as 0 is falsey* +:use-implicit-booleaness-not-comparison-to-zero (C1805): *"%s" can be simplified to "%s" as 0 is falsey* Used when Pylint detects comparison to a 0 constant. +:use-implicit-booleaness-not-comparison-to-string (C1804): *"%s" can be simplified to "%s" as an empty string is falsey* + Used when Pylint detects comparison to an empty string constant. :use-implicit-booleaness-not-comparison (C1803): *'%s' can be simplified to '%s' as an empty %s is falsey* Used when Pylint detects that collection literal comparison is being used to check for emptiness; Use implicit booleaness instead of a collection classes; diff --git a/doc/user_guide/configuration/all-options.rst b/doc/user_guide/configuration/all-options.rst index 8ddafa104..8b68ab7dd 100644 --- a/doc/user_guide/configuration/all-options.rst +++ b/doc/user_guide/configuration/all-options.rst @@ -233,7 +233,7 @@ Standard Checkers confidence = ["HIGH", "CONTROL_FLOW", "INFERENCE", "INFERENCE_FAILURE", "UNDEFINED"] - disable = ["raw-checker-failed", "bad-inline-option", "locally-disabled", "file-ignored", "suppressed-message", "useless-suppression", "deprecated-pragma", "use-implicit-booleaness-not-comparison-to-zero", "use-symbolic-message-instead", "consider-using-augmented-assign"] + disable = ["raw-checker-failed", "bad-inline-option", "locally-disabled", "file-ignored", "suppressed-message", "useless-suppression", "deprecated-pragma", "use-implicit-booleaness-not-comparison-to-string", "use-implicit-booleaness-not-comparison-to-zero", "use-symbolic-message-instead", "consider-using-augmented-assign"] enable = [] diff --git a/doc/user_guide/messages/messages_overview.rst b/doc/user_guide/messages/messages_overview.rst index 50f77d35e..9515fecb4 100644 --- a/doc/user_guide/messages/messages_overview.rst +++ b/doc/user_guide/messages/messages_overview.rst @@ -390,7 +390,6 @@ All messages in the convention category: convention/bad-file-encoding convention/bad-mcs-classmethod-argument convention/bad-mcs-method-argument - convention/compare-to-empty-string convention/consider-iterating-dictionary convention/consider-using-any-or-all convention/consider-using-dict-items @@ -432,6 +431,7 @@ All messages in the convention category: convention/unnecessary-lambda-assignment convention/unneeded-not convention/use-implicit-booleaness-not-comparison + convention/use-implicit-booleaness-not-comparison-to-string convention/use-implicit-booleaness-not-comparison-to-zero convention/use-implicit-booleaness-not-len convention/use-maxsplit-arg @@ -449,6 +449,7 @@ All renamed messages in the convention category: :titlesonly: convention/blacklisted-name + convention/compare-to-empty-string convention/compare-to-zero convention/len-as-condition convention/missing-docstring |