Skip to content
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

Allow adding a kwonly arg with "expected" in wraps #282

Open
aulemahal opened this issue Mar 12, 2021 · 0 comments
Open

Allow adding a kwonly arg with "expected" in wraps #282

aulemahal opened this issue Mar 12, 2021 · 0 comments

Comments

@aulemahal
Copy link
Contributor

Hi!

I think it could be nice to allow the addition of a keyword-only arg when wrapping a function and using expected.

As wraps and update_wrapper only pass the items of expected directly to FunctionBuilder.add_arg, it could be a simple matter of allowing 3 elements tuples, i.e. : (name, default, kwonly), where kwonly is a boolean.

I might have time to suggest a PR in the next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant