Drop a pass-only elif by negating its condition

Proprietary

When an elif body is only pass and an else follows, invert the elif condition and absorb the else body. A pass branch carrying a comment, and an else holding another elif, are left alone.

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

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