Simplify identity comprehension to list()/set() call
Recipe ID
org.openrewrite.python.cleanup.IdentityComprehensionArtifactopenrewrite-static-analysisA comprehension that simply passes through each element unchanged is equivalent to calling list() or set() on the iterable.
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.IdentityComprehensionIf the recipe isn’t available locally, install it with:
mod config recipes pip install openrewrite-static-analysis