-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[doc] Add warning for empty sequences in 'use-implicit-booleaness-not…
…-comparison'
- Loading branch information
1 parent
cbef607
commit 5f65700
Showing
3 changed files
with
7 additions
and
3 deletions.
There are no files selected for viewing
3 changes: 2 additions & 1 deletion
3
doc/data/messages/u/use-implicit-booleaness-not-comparison-to-string/details.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
Following this check blindly in weakly typed code base can create hard to debug issues. If the value | ||
can be something else that is falsey but not a string (for example ``None``, or ``0``), the code will | ||
can be something else that is falsey but not a string (for example ``None``, an empty sequence, or ``0``), | ||
the code will | ||
not be equivalent. |
4 changes: 2 additions & 2 deletions
4
doc/data/messages/u/use-implicit-booleaness-not-comparison-to-zero/details.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Following this check blindly in weakly typed code base can create hard to debug issues. If the value | ||
can be something else that is falsey but not an ``int`` (for example ``None``, or an empty string), | ||
the code will not be equivalent. | ||
can be something else that is falsey but not an ``int`` (for example ``None``, an empty sequence, | ||
or an empty string), the code will not be equivalent. |
3 changes: 3 additions & 0 deletions
3
doc/data/messages/u/use-implicit-booleaness-not-comparison/details.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Following this check blindly in weakly typed code base can create hard to debug issues. If the value | ||
can be something else that is falsey but not a sequence (for example ``None``, an empty string, or ``0``), | ||
the code will not be equivalent. |