You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can't just use Callable[[], Awaitable[T] because we might also accept positional arguments, but either ParamSpec or overloads for zero-to-five positional arguments should work. (the latter because paramspec probably gets kwargs wrong here)
The text was updated successfully, but these errors were encountered:
You need TypeVarTuple to type this correctly. mypy doesn't support it yet: python/mypy#12280
If you use the plugin ([mypy] plugins = trio_typing.plugin) then you should get correct type-checking for these calls. There are a number of different functions in trio that have this signature and I wasn't keen on maintaining N-ary overloads for all of them.
jakkdl
changed the title
trio.run() and nursery.start[_soon](f, ...) should not typecheck if f is missing required argumentsTypeVarTuple support
Nov 4, 2023
We can't just use
Callable[[], Awaitable[T]
because we might also accept positional arguments, but eitherParamSpec
or overloads for zero-to-five positional arguments should work. (the latter because paramspec probably gets kwargs wrong here)The text was updated successfully, but these errors were encountered: