Flip an empty if body by negating the condition
ProprietaryWhen the if branch is just pass and an else exists, invert the test and promote the else body to the if body. A pass branch carrying a comment is left alone.
org. openrewrite. python. cleanup. SwapIfElseBranchesmod run . --recipe= org. openrewrite. python. cleanup. SwapIfElseBranchesInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.