Error reference
Every Basilisk diagnostic has a unique code. When the checker reports one it
links here — see: https://www.basilisk-python.dev/errors/BSK-XXXX —
so you can read what it means and how to fix it. 160 codes in total.
For worked examples with real CLI output, start with the rules overview.
Missing Annotations (5)
-
BSK-E0001Missing parameter type annotation -
BSK-E0002Missing return type annotation -
BSK-E0003Missing variable type annotation -
BSK-E0004Missing*args/**kwargstype annotation -
BSK-E0005Missing class attribute type annotation
Type Safety (19)
-
BSK-E0010Unresolved import -
BSK-E0011Return type mismatch -
BSK-E0012Argument type mismatch at a call site -
BSK-E0013Return type mismatch — inferred return type incompatible with annotation -
BSK-E0014Assignment type incompatibility (literal mismatches) -
BSK-E0015Invalid type argument count or form -
BSK-E0016Incompatible method override -
BSK-E0017Incompatible class attribute override -
BSK-E0018Undefined variable used in a return statement -
BSK-E0019Unbound variable on some code paths -
BSK-E0020Missing@overloadimplementation -
BSK-E0021Overlapping@overloadsignatures -
BSK-E0022Unhashable type used as a dict key -
BSK-E0023Non-exhaustivematchstatement -
BSK-E0024Invalid type form — numeric literal used as type annotation -
BSK-E0025Missing@overridedecorator -
BSK-E0026TypeVardeclared with exactly one constraint -
BSK-E0027DuplicateTypeVarin aGeneric...base -
BSK-E0029Method defined inside aTypedDictclass
Type System (130)
-
BSK-E0030Non-defaultTypeVarfollows a defaultTypeVarinGeneric... -
BSK-E0031Invalidcast()call -
BSK-E0032Invalid keyword argument inTypedDictclass definition -
BSK-E0033Invalidreveal_type()call -
BSK-E0034@finaldecorator violations -
BSK-E0035Required/NotRequiredused in an invalid context -
BSK-E0036ClassVarused in an invalid context -
BSK-E0037InvalidTypedDict(...)functional-syntax call -
BSK-E0038InvalidTypedDictinheritance -
BSK-E0039Invalidassert_type()call -
BSK-E0040Invalid Enum subclassing -
BSK-E0041Too few arguments in a function call -
BSK-E0042PEP 695 type parameter syntax mixed with traditionalTypeVars -
BSK-E0043Non-TypeVar argument inGeneric...orProtocol... -
BSK-E0044Finalused in an invalid position -
BSK-E0045Invalid first argument toAnnotated... -
BSK-E0046Enum member annotated with an explicit type -
BSK-E0047Invalid type expression in annotation -
BSK-E0048Invalid right-hand side for aTypeAliasannotation -
BSK-E0049Multiple unbounded tuple components in a single tuple type -
BSK-E0050InvalidNewType(...)call -
BSK-E0051InvalidLiteralparameterization -
BSK-E0052Assignment to attribute of a frozen dataclass instance, or invalid frozen/non-frozen dataclass inheritance -
BSK-E0053assert_type()type mismatch -
BSK-E0054Finaltype qualifier annotation violations -
BSK-E0055InvalidTypeVar/TypeVarTuple/ParamSpeckeyword argument combination -
BSK-E0056Mutation ofReadOnlyTypedDictfields -
BSK-E0057Invalid RHS in a PEP 695type X = rhsstatement -
BSK-E0058Annotated...requires at least two arguments -
BSK-E0059Access to__match_args__on a dataclass withmatch_args=False -
BSK-E0060Invalid ordering comparison of dataclass instances -
BSK-E0061assert_typewithLiteralEnum.MEMBERon enum-typed param -
BSK-E0062-> NoReturn/-> Neverfunction can fall through -
BSK-E0063Non-hashable dataclass assigned to aHashable-annotated variable -
BSK-E0064Invalid argument in aNamedTupleconstructor call -
BSK-E0065Access to anint-only attribute on afloat-typed parameter -
BSK-E0066Enum member value incompatible with_value_type annotation -
BSK-E0067Non-member referenced inLiteralEnumClass.Xannotation -
BSK-E0068Literal"EnumClass.MEMBER"(string) used whereLiteralEnumClass.MEMBER(enum member reference) is required -
BSK-E0069Dataclass constructor argument violations -
BSK-E0070Nevertype compatibility violations -
BSK-E0071Historical positional-only parameter violations -
BSK-E0072No matching overload for subscript indexing -
BSK-E0073NamedTuple-to-tuple type incompatibility -
BSK-E0074Constructor call type mismatch with specialized generic class -
BSK-E0075Incompatible type forSelf-typed attribute -
BSK-E0076Overload union expansion failure -
BSK-E0077ProtocolSelf-return conformance violation -
BSK-E0078Selftype violations in generics -
BSK-E0079Module assigned to incompatible protocol type -
BSK-E0080TypeVarupper bound violation at call site -
BSK-E0081TypeVarTupleunpack minimum type argument violation -
BSK-E0082TypeVarTuplecallable/tuple argument mismatch -
BSK-E0083TypeVarTuplemust be unpacked with*operator -
BSK-E0084TypeVarTuplevariance/bounds/constraints violation -
BSK-E0085TypeVarTupleargument count mismatch -
BSK-E0086MultipleTypeVarTupleunpacks in generic or tuple type -
BSK-E0087Reserved for future PEP 695 type parameter checks -
BSK-E0088TypedDictruntime violation -
BSK-E0089Invalid PEP 695 type parameter bound or constraint -
BSK-E0090Invalid tuple type syntax -
BSK-E0091IncompatibleTypeVarbound or constraint with its default -
BSK-E0092Wrong number of type arguments to a generic class or type alias -
BSK-E0093Invalid key or value type inTypedDictassignment -
BSK-E0094Selftype used in an invalid location -
BSK-E0095InitVarfield validation in dataclasses -
BSK-E0096Type mismatch between a dataclassfield(default_factory=…)and the field's declared type annotation -
BSK-E0097Protocol method sets self-attributes not declared in the Protocol -
BSK-E0098Non-Protocol base class in a Protocol definition -
BSK-E0099Direct instantiation of a Protocol class -
BSK-E0100Augmented assignment widensLiteraltype -
BSK-E0101TypeGuardorTypeIson method with no narrowing parameter -
BSK-E0102InvalidTypeVardefault referencing anotherTypeVar -
BSK-E0103Tuple index out of bounds -
BSK-E0104Cyclical type alias reference -
BSK-E0105Invalid attribute access on bounded type variable -
BSK-E0106Protocol class used wheretypeProtois expected -
BSK-E0107Variance incompatibility in base class parameterisation -
BSK-E0108Dataclass slots violations -
BSK-E0109TypeVarbound violation at call site -
BSK-E0110Protocol variance violation -
BSK-E0111Constructor call errors via__init__method -
BSK-E0112TypeGuard/TypeIs return type incompatibility in callable arguments -
BSK-E0113TypeIsnarrows to a type inconsistent with the input type -
BSK-E0114Protocolisinstance/issubclassviolations -
BSK-E0115Use of deprecated class, function, or method -
BSK-E0116NamedTupleclass definition errors -
BSK-E0117Unbound type variable in scope -
BSK-E0118Callingsuper().method()on an abstract method with no default implementation -
BSK-E0119Protocolisinstance/issubclassviolations -
BSK-E0120Generator return type and yield type violations -
BSK-E0121Protocol conformance violation in annotated assignment -
BSK-E0122Callable call-site arity and argument validation -
BSK-E0123super()call on abstract protocol method with no default implementation -
BSK-E0124Protocol attribute tuple element type mismatch -
BSK-E0125Access to instance attribute on a class object -
BSK-E0126LiteralStringandLiteralassignment incompatibilities -
BSK-E0127Tuple index out of range -
BSK-E0128``TypeVar`` default referential violations -
BSK-E0129Literal value assignment incompatibility -
BSK-E0130TypeVarscoping violation -
BSK-E0131Generator yield/send/return type mismatch -
BSK-E0132InconsistentTypeVarordering across base classes -
BSK-E0133ProtocolTypeVarvariance mismatch -
BSK-E0134Invariant generic type mismatch at call site -
BSK-E0136Callable subtyping violations (covariance / contravariance) -
BSK-E0137Generic protocol violations -
BSK-E0138dataclass_transformmetaclass violations -
BSK-E0139InvalidTypeVarTuplespecialization of generic alias -
BSK-E0140Callable and Protocol assignment compatibility -
BSK-E0141UnpackTypedDict kwargs violations -
BSK-E0142dataclass_transformviolations when the transform is applied via a base class -
BSK-E0143NamedTupleusage violations -
BSK-E0144Invalid constructor call viatypeTparameter -
BSK-E0145InvalidtypeXusage violations -
BSK-E0146Protocol class object violations -
BSK-E0147Tuple starred-unpack type compatibility violation -
BSK-E0148Generic type argument violations -
BSK-E0149PEP 695 generic type parameter scoping violations -
BSK-E0150Variable defined only in dead version/platform branch -
BSK-E0151InvalidTypeAliasType(...)call -
BSK-E0152Missing type stubs for installed package -
BSK-E0153Invalid call to a constructor-derived callable -
BSK-E0154Access to a module attribute the local stub does not declare -
BSK-E0155PEP 695 syntax used below the configured target version -
BSK-E0156TypedDictextra_items/closed(PEP 728) violations -
BSK-E0157Dataclass field without a default after a field with a default -
BSK-E0158Inconsistent decorators across an overloaded method -
BSK-E0159@overrideon a method with no matching ancestor method -
BSK-E0160Overload implementation is inconsistent with its signatures