-
Notifications
You must be signed in to change notification settings - Fork 384
Closed
Milestone
Description
Occasionally catch myself doing the following:
from invoke import Collection, task
# stuff
@task
def foo(ctx, blah, otherblah):
ctx.run("whatever")
ns = Collection(foo)Which leads to a nice 'test' did not receive all required positional arguments! error, because task != ctask. Also I think part of an FAQ mentions this (!)
If it's something I do myself cuz I haven't written a new Invoke task in a month...it's gonna bite users. The un-contextualized use case is and should be the minority; therefore I really should:
- Update docs to describe a "contextualized by default" setup, including removing mention of
@ctask.- Maybe be hardcore and just don't even bother with uncontextualized tasks? Eh. Leaving the flag in allows people to rebind the name to an inverted-ctask if they really care about not using the context.
- Update tests to match
- Add new tests enforcing a useful "Did you forget a leading context argument?" add-on to the above error message, probably.
- Implement.
- Update all my stuff (whee! Good thing most of it is in Invocations...)
- Add big honkin' backwards incompatibility note to teh changelog (maybe a good new Releases feature?)