Merge collapsible if statements
Recipe ID
org.openrewrite.python.codequality.CollapsibleIfStatementsArtifactopenrewrite-migrate-pythonCombine nested if statements that have no else branch into a single if joined with and.
Single recipepythonRSPEC-S1066code-qualityProprietary
Usage
This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe org.openrewrite.python.codequality.CollapsibleIfStatementsIf the recipe isn’t available locally, install it with:
mod config recipes pip install openrewrite-migrate-python