BSK-E0153
error
Invalid call to a constructor-derived callable
(<https://typing.readthedocs.io/en/latest/spec/constructors.html#converting-a-constructor-to-callable>).
When a class object flows through an identity-over-callable function such as
def accepts_callable(cb: Callable[P, R]) -> Callable[P, R]:
return cb
r1 = accepts_callable(Class1) # r1 has Class1's constructor signature
the bound variable (r1) gains the constructor-to-callable signature of the class. Calls to that variable must match the synthesized signature:
r1() # E0153: missing required argument `x`
r1(y=1) # E0153: unexpected keyword argument `y`
The synthesized signature is derived (in priority order) from the metaclass __call__, then __new__ (when it returns a type other than the class / Self), then __init__, mirroring runtime construction.
How to handle it
Every rule is on by default — strict is the default, not a cage. You can dial
BSK-E0153 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-E0153