New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Give execute and maybeDeferred correct type annotations #11696
Comments
For what it's worth, I've been using this for a while now: _P = ParamSpec('_P')
...
def maybeDeferred(f: Union[Callable[_P, _T], Awaitable[_T]], *args: _P.args, **kwargs: _P.kwargs) -> Deferred[_T]:
... |
Thanks. I think the
So unfortunately the best type I can figure out for |
exarkun
added a commit
that referenced
this issue
Oct 1, 2022
This comment was marked as off-topic.
This comment was marked as off-topic.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: