Replace Yoda conditions with normal comparisons

Proprietary

Replace Yoda conditions (e.g. None == x) with the conventional comparison order (e.g. x == None). A chained comparison, or one with a constant on both sides, is left alone. See Ruff rule SIM300.

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

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