Replace typing.Callable with collections.abc.Callable
Recipe ID
org.openrewrite.python.migrate.ReplaceTypingCallableWithCollectionsAbcCallableArtifactopenrewrite-migrate-pythonPEP 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.ReplaceTypingCallableWithCollectionsAbcCallableIf the recipe isn’t available locally, install it with:
mod config recipes pip install openrewrite-migrate-pythonDefinition
This recipe runs the following recipes in order.
- Change import
org.openrewrite.python.ChangeImport