directives_disjoint_base
error
PEP 800 disjoint bases
PEP 800 introduces typing.disjoint_base. A class is a disjoint base when it is decorated @disjoint_base or defines a non-empty __slots__. A class definition must have a single dominating disjoint base among its bases:
@disjoint_base
class Left: ...
@disjoint_base
class Right: ...
class Both(Left, Right): ... # error — incompatible disjoint bases
The decorator may be used only on nominal classes (including NamedTuple); it is an error to apply it to a function, a TypedDict, or a Protocol.
How to handle it
Every rule is on by default — strict is the default, not a cage. You can dial
directives_disjoint_base 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/directives_disjoint_base