-
Notifications
You must be signed in to change notification settings - Fork 234
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
(Partial) keyword argument forwarding #1524
Comments
My understanding of PEP612 always was that the "pos-args-only" and "kwargs-only" case (and any other arbitrary restriction) would be supported in the future through upper bounds, the main limiting factor of this, is that we don't have a complete way to manually bind a param spec yet (without using another callable). We've relied on callback protocols as a workaround for the PEP646 let us cover one very important use-case "pos-args-only", but it also doesn't specify upper bounds yet, so we can't cover all the possible uses of |
Split from #1000.
I have a similar use case with Ariadne middleware functions, but with
kwargs
. In Ariadne, a "resolver" function takes two positional arguments and a varying number of keyword arguments that depend on the API the resolver implements. As the name implies, a middleware function sits between Ariadne and the resolver function and forwards arguments.Ideally, I would like to type a middleware function as follows:
But currently this isn't possible, because
_P.args
is "missing".The text was updated successfully, but these errors were encountered: