generics_typevartuple_callable
error
TypeVarTuple callable/tuple argument mismatch
When a constructor (or function) links two parameters via a TypeVarTuple -- one as Callable[Ts, R] and the other as tupleTs -- passing a known function as the callable infers the expected element types for the tuple. If the tuple literal has elements whose types do not match the inferred order, Basilisk reports the mismatch.
Ts = TypeVarTuple("Ts")
class Process:
def __init__(self, target: Callable[[*Ts], None], args: tuple[*Ts]) -> None: ...
def func1(arg1: int, arg2: str) -> None: ...
Process(target=func1, args=(0, "")) # OK
Process(target=func1, args=("", 0)) # E -- str, int does not match int, str
How to handle it
Every rule is on by default — strict is the default, not a cage. You can dial
generics_typevartuple_callable 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_typevartuple_callable