BSK-E0023
error
Non-exhaustive match statement
A value-dispatch match statement that has no irrefutable branch may fail to handle certain runtime values, leading to a silent fall-through (Python does not raise an error for unmatched match subjects). Basilisk treats this as an error in strict mode.
Two cases are not flagged, matching the reference checkers: a bare capture case name: (no guard) is irrefutable — like case _:, it makes the match exhaustive; a structural match (sequence/mapping patterns) decomposes open-ended shapes — e.g. narrowing a tuple union of mixed arity — where a catch-all is not required for correctness.
Real basilisk check output
What you see when BSK-E0023 fires on a minimal example:
How to handle it
Every rule is on by default — strict is the default, not a cage. You can dial
BSK-E0023 down per-file or per-path from your editor or
pyproject.toml, or fix the code
so it type-checks. See the Type Safety rules and
the complete diagnostic reference.
Canonical URL: https://www.basilisk-python.dev/errors/BSK-E0023