BSK-E0099
error
Direct instantiation of a Protocol class
Protocol classes define structural interfaces and cannot be instantiated directly. Only concrete classes that satisfy the protocol may be instantiated.
from typing import Protocol
class MyProto(Protocol):
def method(self) -> int: ...
obj = MyProto() # E — cannot instantiate a Protocol
Real basilisk check output
What you see when BSK-E0099 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-E0099 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/BSK-E0099