.. _use-implicit-booleaness-not-comparison:

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:**

.. literalinclude:: /data/messages/u/use-implicit-booleaness-not-comparison/bad.py
   :language: python

**Correct code:**

.. literalinclude:: /data/messages/u/use-implicit-booleaness-not-comparison/good.py
   :language: python



Created by the `refactoring <https://github.com/PyCQA/pylint/blob/main/pylint/checkers/refactoring/implicit_booleaness_checker.py>`__ checker.