.. _simplifiable-if-statement:

simplifiable-if-statement / R1703
=================================

**Message emitted:**

The if statement can be replaced with %s

**Description:**

*Used when an if statement can be replaced with 'bool(test)'.*

**Problematic code:**

.. literalinclude:: /data/messages/s/simplifiable-if-statement/bad.py
   :language: python

**Correct code:**

.. literalinclude:: /data/messages/s/simplifiable-if-statement/good.py
   :language: python



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