Consolidate repeated == with or into in

Proprietary

Fold 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.MergeComparisons
mod run . --recipe=org.openrewrite.python.cleanup.MergeComparisons

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