use-implicit-booleaness-not-comparison / C1803#

Message emitted:

'%s' can be simplified to '%s' as an empty %s is falsey

Description:

Used when Pylint detects that collection literal comparison is being used to check for emptiness; Use implicit booleaness instead of a collection classes; empty collections are considered as false

Problematic code:

z = []

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

Correct code:

z = []

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

Created by the refactoring checker.