Remove useless object inheritance
Recipe ID
org.openrewrite.python.cleanup.RemoveUselessObjectInheritanceArtifactopenrewrite-migrate-pythonRemove redundant object base class from class declarations. In Python 3, all classes implicitly inherit from object. It only fires where the base's type resolves to the builtin object, and leaves alone a base list holding comments.
Single recipepythoncleanupruffUP004Proprietary
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.RemoveUselessObjectInheritanceIf the recipe isn’t available locally, install it with:
mod config recipes pip install openrewrite-migrate-python
mod config recipes jar install org.openrewrite.recipe:rewrite-migrate-python:RELEASE
mod config recipes jar install org.openrewrite:rewrite-python:RELEASE