classes_override
error
Incompatible method override
When a class method marked with @override has a different parameter signature or return type than the corresponding method in a same-module base class, Basilisk reports an incompatible override.
The check compares annotation text extracted from the source for non-self parameters and the return type. The self/cls parameter is always skipped since its type naturally differs between base and child class.
class Base:
def process(self: Base, data: str) -> str: ...
class Child(Base):
@override
def process(self: Child, data: int) -> int: ... # E0016
How to handle it
Every rule is on by default — strict is the default, not a cage. You can dial
classes_override down per-file or per-path from your editor or
pyproject.toml, or fix the code
so it type-checks. See the Type System rules and
the complete diagnostic reference.
Canonical URL: https://www.basilisk-python.dev/errors/classes_override