Skip to content

Commit

Permalink
[use-implicit-booleaness-not-comparison] Add an example of good and b…
Browse files Browse the repository at this point in the history
…ad code
  • Loading branch information
Pierre-Sassoulas committed Nov 7, 2022
1 parent f5f9e26 commit 8d03101
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
z = []

if z != []: # [use-implicit-booleaness-not-comparison]
print("z is not an empty sequence")

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
# This is a placeholder for correct code for this message.
z = []

if z:
print("z is not an empty sequence")

0 comments on commit 8d03101

Please sign in to comment.