Fix bug which happens while using @click.pass_obj
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Rebased version of #410 for bugfix release When a function is decorated with @click.pass_obj, it should receive the ctx.obj content as first argument. Instead, it actually receives the ctx.obj content *and* ctx itself. This is an undocumented behavior, and it was introduced in click 5.0 with commit 695ca34. This commit fixes the decorator in order to restore the documented, pre-5.0 behavior, so the decorated function will receive only ctx.obj.
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
3 files+23 added−1 removed
- tests:+16 added−0 removed
- other:+7 added−1 removed