Files
ruff/crates/ty_python_semantic/resources/lint_docs/inconsistent-mro.md

432 B

What it does

Checks for classes with an inconsistent method resolution order (MRO).

Why is this bad?

Classes with an inconsistent MRO will raise a TypeError at runtime.

Examples

class A: ...


class B(A): ...


# TypeError: Cannot create a consistent method resolution order
class C(A, B): ...  # error