Use chained comparison syntax
ProprietaryMerge two relational tests that share a middle operand into a single chained comparison, e.g. 0 < idx and idx < size becomes 0 < idx < size. It declines a middle operand with side effects, which the chained form evaluates only once, and a second test whose dropped operand holds comments.
org. openrewrite. python. cleanup. ChainComparesmod run . --recipe= org. openrewrite. python. cleanup. ChainComparesInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.