I have been tinkering with Invoke, but I came across something that is quite an odd case that there seems to be no real PEP guideline for it.
Invoke lets you define your own CLI arguments for whatever tasks you define, and you can optionally provide "help notes" to a task
decorator. Specific example can be found here.
If there are more parameters, I could probably do it like this, but it feels kind of weird if there are many tasks. What coding style would you guys do?
help_for_hi = {
'name1': 'Name of Person 1',
'name2': 'Name of Person 2',
'name3': 'Name of Person 3',
}
@task(help=help_for_hi)
def hi(ctx, name1, name2, name3):
"""Say hi to three people."""
print("Hi %s, %s, and %s!" % (name1, name2, name3))
UPDATED
As requested, this is what 'too long' would probably look like.
@task(help={'name1': 'Name of Person 1', 'name2': 'Name of Person 2', 'name3': 'Name of Person 3'})
def hi(ctx, name1, name2, name3):
"""Say hi to three people."""
print("Hi %s, %s, and %s!" % (name1, name2, name3))