← All recipes
Moderne licensed

Fold constants and flatten nested f-strings

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

Inline constant values directly into f-string text and unwrap nested f-strings into their enclosing string.

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

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

mod config recipes pip install openrewrite-static-analysis