Skip to content

Commit

Permalink
docs: fix typo in implicit booleaness checker description.
Browse files Browse the repository at this point in the history
  • Loading branch information
thebarbershop authored and DanielNoord committed Jul 12, 2023
1 parent e71f63b commit 4cbd44c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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

0 comments on commit 4cbd44c

Please sign in to comment.