Merge multiple startswith()/endswith() calls into one

Proprietary

When several startswith() or endswith() calls on the same receiver are joined by or, combine them into a single call with a tuple argument. It only fires where the receiver's type resolves to str or bytes, the receiver is a name or attribute, every argument is a string literal of the receiver's kind, and no comment would be lost.

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

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