Fold same-literal ==/!= comparisons to boolean constants

Proprietary

When both sides of == or != are the same literal, replace the expression with True or False respectively. A comparison of two names, even the same name, or one holding comments is left alone.

org.openrewrite.python.cleanup.EqualityIdentity
mod run . --recipe=org.openrewrite.python.cleanup.EqualityIdentity

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.