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

Don't arbitrarily strip an argument from make_pass_decorator #787

Merged
merged 2 commits into from Aug 13, 2018

Conversation

ericfrederich
Copy link
Contributor

This fixes #786

@ericfrederich
Copy link
Contributor Author

I'd like this merged. Should this be based on master or 6.x-maintenance?
When I rebase I'll also write a test.

@dsully
Copy link
Contributor

dsully commented May 14, 2018

@ericfrederich Could you turn the example in #786 into unit tests?

This is a very subtle change, so it'd be good to ensure it is covered.

Thanks

ericfrederich and others added 2 commits August 11, 2018 02:01
This adds a simple test case which ensures that `make_pass_decorator`
doesn't consume arguments if it's called out of order.
@sirosen
Copy link
Contributor

sirosen commented Aug 11, 2018

As this PR is fairly old, I took the liberty of rebasing it and adding the requested test.
Apologies if people feel like this is overstepping, but it's all meant in good faith.

@davidism
Copy link
Member

davidism commented Aug 13, 2018

This seems correct, but I'd really like to know why it was stripping one argument, which seems to only come up when using pass_context and make_pass_decorator together.

Since neither pass_context nor pass_obj strip an argument, I'll merge this.

@davidism davidism merged commit 56314db into pallets:master Aug 13, 2018
@davidism davidism added this to the 7.0 milestone Aug 13, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

make_pass_decorator strips argument
5 participants