Skip to content
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

docs: Fix typo in implicit booleaness checker description. #8847

Merged
merged 1 commit into from
Jul 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/user_guide/checkers/features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@ Refactoring checker Messages
can be simplified by using the enumerate builtin.
:use-implicit-booleaness-not-len (C1802): *Do not use `len(SEQUENCE)` without comparison to determine if a sequence is empty*
Empty sequences are considered false in a boolean context. You can either
remove the call to 'len' (``if not x``) or compare the length against ascalar
remove the call to 'len' (``if not x``) or compare the length against a scalar
(``if len(x) > 1``).
:consider-using-f-string (C0209): *Formatting a regular string which could be an f-string*
Used when we detect a string that is being formatted with format() or % which
Expand Down
2 changes: 1 addition & 1 deletion pylint/checkers/refactoring/implicit_booleaness_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class ImplicitBooleanessChecker(checkers.BaseChecker):
"use-implicit-booleaness-not-len",
"Empty sequences are considered false in a boolean context. You can either"
" remove the call to 'len' (``if not x``) or compare the length against a"
"scalar (``if len(x) > 1``).",
" scalar (``if len(x) > 1``).",
{"old_names": [("C1801", "len-as-condition")]},
),
"C1803": (
Expand Down