BSK-E0019 error

Unbound variable on some code paths

When a function contains a return <name> statement and the name is assigned in the function body, but only inside conditional branches (e.g. if, while, try), it may be unbound when the return is reached on other paths.

def maybe_assign(flag: bool) -> int:
    if flag:
        result = 42
    return result   # result may be unbound if flag is False → E0019

Real basilisk check output

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

basilisk check output reporting BSK-E0019 — Unbound variable on some code paths

How to handle it

Every rule is on by default — strict is the default, not a cage. You can dial BSK-E0019 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-E0019