Closed
Description
Bug Report
I would like a generic class with TypeVarTuple and connect a callback as parameter to a member function. This works for instances of the object created with one or more type arguments, but fails for no types.
To Reproduce
https://mypy-play.net/?mypy=latest&python=3.13&gist=9176cff57ec791ec0bd9d49e17b1e85e
Expected Behavior
Mypy should allow unpacking the TypeVarTuple to a Callable with no arguments.
Actual Behavior
error: Argument 1 to "foo" of "Class" has incompatible type "Callable[[], None]"; expected "Callable[[VarArg(Never)], None]" [arg-type]
Your Environment
mypy playground
- Mypy version used: 1.15.0
- Mypy command-line flags:
- Mypy configuration options from
mypy.ini
(and other config files): - Python version used: 3.13