← All recipes
Moderne licensed

Drop unnecessary step 1 argument from range()

Recipe IDorg.openrewrite.python.cleanup.RemoveUnitStepFromRangeArtifactopenrewrite-static-analysis

Shorten range(a, b, 1) to range(a, b) because range already defaults to a step of one.

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.RemoveUnitStepFromRange

If the recipe isn’t available locally, install it with:

mod config recipes pip install openrewrite-static-analysis