BSK-0025 analyze

Missing @override decorator

When a class overrides a method that is also defined in one of its base classes (both defined within the same module), the overriding method must carry the @override decorator (PEP 698 / typing.override).

The check is limited to base classes that appear in the same source module, because Basilisk cannot inspect the base class body without resolving cross-module imports in Phase 1.

Protocol implementations are exempt: when a class satisfies a Protocol contract, it is expected to define the protocol methods without @override.

Version gate (issue #171): @override (PEP 698 / typing.override) was introduced in Python 3.12, so suggesting it on an older configured target is a false positive — the decorator cannot be imported there. BSK-0025 is silent when the configured python_version is below 3.12.

Real basilisk check output

What you see when BSK-0025 fires on a minimal example:

basilisk check output reporting BSK-0025 — Missing `@override` decorator

How to handle it

This Basilisk-specific rule is off by default. Enable its strictness tag when the policy fits your project, then configure its severity globally or per path in pyproject.toml.

Canonical URL: https://www.basilisk-python.dev/errors/BSK-0025