Replace Yoda conditions with normal comparisons
ProprietaryReplace 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. ReplaceYodaConditionsmod run . --recipe= org. openrewrite. python. cleanup. ReplaceYodaConditionsInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.