.. _using-constant-test:

using-constant-test / W0125
===========================

**Message emitted:**

Using a conditional statement with a constant value

**Description:**

*Emitted when a conditional statement (If or ternary if) uses a constant value for its test. This might not be what the user intended to do.*

**Problematic code:**

.. literalinclude:: /data/messages/u/using-constant-test/bad.py
   :language: python

**Correct code:**

.. literalinclude:: /data/messages/u/using-constant-test/good.py
   :language: python



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