← All recipes
Moderne licensed

Use dict union operator instead of double-star unpacking

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

Dict literals made up entirely of ** unpacking can be rewritten with the | union operator available since Python 3.9.

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

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

mod config recipes pip install openrewrite-static-analysis