.. _unnecessary-negation: unnecessary-negation / C0117 ============================ **Message emitted:** ``Consider changing "%s" to "%s"`` **Description:** *Used when a boolean expression contains an unneeded negation, e.g. when two negation operators cancel each other out.* **Problematic code:** ``double_not.py``: .. literalinclude:: /data/messages/u/unnecessary-negation/bad/double_not.py :language: python ``equivalent_comparator_exists.py``: .. literalinclude:: /data/messages/u/unnecessary-negation/bad/equivalent_comparator_exists.py :language: python **Correct code:** ``double_not.py``: .. literalinclude:: /data/messages/u/unnecessary-negation/good/double_not.py :language: python ``equivalent_comparator_exists.py``: .. literalinclude:: /data/messages/u/unnecessary-negation/good/equivalent_comparator_exists.py :language: python Created by the `refactoring `__ checker.