-
Notifications
You must be signed in to change notification settings - Fork 188
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
Use _MiddlewareFactory as decorator with arguments #228
Conversation
@renyidong Could you update this PR with a test case showing your intended workflow? I think the idea itself is fine! |
@mmerickel Taking the example from http://docs.webob.org/en/latest/api/dec.html
I have to define an extra function and wrap it with the middleware. With this patch, I would be able to achieve same effect as the example at very beginning. |
@renyidong I understand the patch. I was asking if you could please add a test case to the codebase to ensure this keeps working in the future. |
@mmerickel Apologies for my misinterpret. I appended test code to |
A separate test would be preferred. Thanks! |
@bertjwregeer Let me know if there is anything else you need. |
LGTM! |
Sorry for taking so long! I've merged this into master. |
This change allows _MiddlewareFactory to be used as decorator with argument: