mirror of
https://github.com/clearml/clearml
synced 2025-06-26 18:16:07 +00:00
Fix group arguments in click (#561)
This commit is contained in:
committed by
GitHub
parent
a47f127679
commit
c01e2e1166
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user