← All recipes
Moderne licensed

Remove obsolete __future__ imports

Recipe IDorg.openrewrite.python.migrate.RemoveFutureImportsArtifactopenrewrite-migrate-python

Remove from __future__ import ... statements for features that are enabled by default in Python 3. The search-only FindFutureImports recipe reports all __future__ imports, including annotations, which this recipe keeps.

Single recipepythonfuturemigrationProprietary

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.migrate.RemoveFutureImports

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

mod config recipes pip install openrewrite-migrate-python