You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The inner most wrapper of make_pass_decorator invokes a function with *args[1:] which strips an argument.
A smaller example could be made but the following is the invoking other commands example from the docs modified to also take in a custom config object.
The only difference between dist_working and dist_broken is the order of the decorators and consequently the parameters they take.
In my opinion they should both be valid and work. What happens in dist_broken is, like the title says, the make_pass_decorator wrapper invokes the function with *args[1:] which removes the context object put there by the previous decorator.
The inner most wrapper of make_pass_decorator invokes a function with
*args[1:]
which strips an argument.A smaller example could be made but the following is the invoking other commands example from the docs modified to also take in a custom config object.
The only difference between
dist_working
anddist_broken
is the order of the decorators and consequently the parameters they take.In my opinion they should both be valid and work. What happens in
dist_broken
is, like the title says, themake_pass_decorator
wrapper invokes the function with*args[1:]
which removes the context object put there by the previous decorator.The text was updated successfully, but these errors were encountered: