Flatten redundant collection constructor wrapping a literal
Recipe ID
org.openrewrite.python.cleanup.UnwrapIterableConstructionArtifactopenrewrite-static-analysisWhen tuple(), list(), or set() wraps a single list or tuple literal, remove the constructor and use the target literal form directly.
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.UnwrapIterableConstructionIf the recipe isn’t available locally, install it with:
mod config recipes pip install openrewrite-static-analysis