import click @cli.command() @click.argument("namespace", nargs=1) def process(namespace): ..... @cli.command() def run(): for namespace in KEYS.iterkeys(): process(namespace)
Running run('some string') calls:
Error: Got unexpected extra arguments (omestring)
It is as if Click is passing a string argument with a single character. Printing an argument shows the correct result.
PS: KEYS Dictionary is defined and works as expected.
source share