Rewrite self-multiplication as ** 2
Recipe ID
org.openrewrite.python.cleanup.SquareIdentityArtifactopenrewrite-static-analysisWhen an expression is multiplied by itself, rewrite it using the exponentiation operator (** 2) for clarity.
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.SquareIdentityIf the recipe isn’t available locally, install it with:
mod config recipes pip install openrewrite-static-analysis