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
The handling of the parameters of f and of args and kwargs is overly general. The handling of _T is incomplete and incorrect with respect to Deferred and coroutine.
execute is in roughly the same situation.
The text was updated successfully, but these errors were encountered:
Thanks. I think the Union there is slightly wrong in a couple ways:
f is not an Awaitable itself but a function that returns a value, possibly in some kind of async container.
If the Union moves inside like Callable[_P, Union[Awaitable[_T], _T]] then the return type expresses nothing more than Callable[_P, _T] because _T includes all of Awaitable[_T] (ie, _T might be Awaitable[_S]).
So unfortunately the best type I can figure out for f is Callable[_P, _T] even though this clearly fails to capture a lot of interesting stuff about the type.
Currently
maybeDeferred
is annotated:The handling of the parameters of
f
and ofargs
andkwargs
is overly general. The handling of_T
is incomplete and incorrect with respect toDeferred
andcoroutine
.execute
is in roughly the same situation.The text was updated successfully, but these errors were encountered: