Fix group arguments in click (#561)

This commit is contained in:
eugen-ajechiloae-clearml
2022-02-12 00:01:44 +02:00
committed by GitHub
parent a47f127679
commit c01e2e1166
2 changed files with 15 additions and 12 deletions

View File

@@ -3,9 +3,12 @@ from clearml import Task
@click.group()
def cli():
task = Task.init(project_name='examples', task_name='click multi command')
print('done')
@click.option('--print-something/--dont-print-something', default=True)
@click.option('--what-to-print', default='something')
def cli(print_something, what_to_print):
Task.init(project_name='examples', task_name='click multi command')
if print_something:
print(what_to_print)
@cli.command('hello', help='test help')
@@ -15,7 +18,6 @@ def hello(count, name):
"""Simple program that greets NAME for a total of COUNT times."""
for x in range(count):
click.echo("Hello {}!".format(name))
print('done')
CONTEXT_SETTINGS = dict(