← All recipes
Moderne licensed

Shorten assignment to compound operator form

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

Convert `target = target op value into target op= value` for arithmetic operators (+, -, *, /, %).

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

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

mod config recipes pip install openrewrite-static-analysis