← All recipes
Moderne licensed

Convert int(a / b) to floor division

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

Replace `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.SimplifyDivision

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

mod config recipes pip install openrewrite-static-analysis