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
#2881 attempted to add TypeVarTuple to the signature of Nursery.start but hit problems and ended up blocked by python/mypy#16522
I'm opening this issue so we can track it on our end as well, or possibly discuss alternate ways of adding type hints. We could consider having a million overloads like trio-typing did as a stop-gap.
A while back I tried writing code to generate those required overloads, just rebased it. It's very ugly, but I think it works with the exception of DTLSEndpoint.serve(). That's also using a variadic generic, I guess the layers of inference required became too much.
If we do go the overload route, remember that overload compatibility checks are quadratic. While I'm not sure it will affect users (I don't think mypy at least runs the compat checks cause the errors won't be reported anyways?), we should still make sure it doesn't balloon type checking time for developing trio.
Did the trio-typing plugin do something smarter than just generate a bunch of overloads? If so maybe we could strip it down to solely that functionality [and incorporate it here].
Although perhaps somebody should just try and contribute the feature upstream, although ilevkivskyi saying it would be tedious is a bit worrying.
#2881 attempted to add
TypeVarTuple
to the signature ofNursery.start
but hit problems and ended up blocked by python/mypy#16522I'm opening this issue so we can track it on our end as well, or possibly discuss alternate ways of adding type hints. We could consider having a million overloads like trio-typing did as a stop-gap.
Equivalent anyio issue: agronholm/anyio#678
The text was updated successfully, but these errors were encountered: