classes_override_2
error
Incompatible class attribute override
When a child class declares an attribute that also exists in a same-module base class but with a different type annotation, Basilisk reports an incompatible override.
class Base:
count: int = 0
class Child(Base):
count: str = "zero" # annotation changed from int to str → E0017
How to handle it
Every rule is on by default — strict is the default, not a cage. You can dial
classes_override_2 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_2