Consolidate repeated == with or into in
ProprietaryFold var == a or var == b into var in [a, b], reducing duplication and improving readability. It only fires in a condition, where var has no side effects, every compared value is a literal, and the comparisons hold no comments.
org. openrewrite. python. cleanup. MergeComparisonsmod run . --recipe= org. openrewrite. python. cleanup. MergeComparisonsInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.