generics_basic error

TypeVar declared with exactly one constraint

PEP 484 requires a TypeVar to have either zero constraints (unconstrained) or two or more constraints. A single constraint makes no sense because it would be equivalent to using the type directly.

How to handle it

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