Eliminate boolean literal from and/or
Recipe ID
org.openrewrite.python.cleanup.RemoveRedundantBooleanArtifactopenrewrite-static-analysisStrip `True or False from and/or expressions where the literal has no effect on the result, e.g. True and val reduces to val and False and val reduces to False`.
Single recipeProprietary
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.cleanup.RemoveRedundantBooleanIf the recipe isn’t available locally, install it with:
mod config recipes pip install openrewrite-static-analysis