Skip to content

Warn against metaclass=type #18320

@JelleZijlstra

Description

@JelleZijlstra

Summary

type is the default metaclass and adding metaclass=type is usually redundant.

Example in python/typeshed#14150. This is similar to https://docs.astral.sh/ruff/rules/useless-object-inheritance/ about inheriting from object.

Metadata

Metadata

Assignees

Labels

ruleImplementing or modifying a lint rule

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions