Convert int(a / b) to floor division
Recipe ID
org.openrewrite.python.cleanup.SimplifyDivisionArtifactopenrewrite-static-analysisReplace `int(a / b) with Python's floor-division operator a // b` for a more concise expression.
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.SimplifyDivisionIf the recipe isn’t available locally, install it with:
mod config recipes pip install openrewrite-static-analysis