← All recipes
Moderne licensed

Replace typing.Callable with collections.abc.Callable

Recipe IDorg.openrewrite.python.migrate.ReplaceTypingCallableWithCollectionsAbcCallableArtifactopenrewrite-migrate-python

PEP 585 deprecated typing.Callable in Python 3.9. Replace with collections.abc.Callable for type annotations.

Composite 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.migrate.ReplaceTypingCallableWithCollectionsAbcCallable

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

mod config recipes pip install openrewrite-migrate-python

Definition

This recipe runs the following recipes in order.