diff options
author | Taseer <taseer94@gmail.com> | 2017-06-02 14:23:55 +0500 |
---|---|---|
committer | Taseer <taseer94@gmail.com> | 2017-06-02 19:41:05 +0500 |
commit | 30f07d0e8e2d82e613155e218d92f126ad1316bf (patch) | |
tree | 0daa3445e6bd359ba6fa0f7c89ff53bf87d062d7 /qtip/cli/commands/cmd_report.py | |
parent | aa27f390c9ad6817d2682c4f59594f43c69d614f (diff) |
Refactor Cli
- Remove reduntant contexts
- Remove verbose option
- Use builtin help and version options
Change-Id: Ifb66009b5f9ab95428ce87c90f739b5221ccdd6f
Signed-off-by: Taseer Ahmed <taseer94@gmail.com>
Diffstat (limited to 'qtip/cli/commands/cmd_report.py')
-rw-r--r-- | qtip/cli/commands/cmd_report.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/qtip/cli/commands/cmd_report.py b/qtip/cli/commands/cmd_report.py index ebc0ef77..4176fd90 100644 --- a/qtip/cli/commands/cmd_report.py +++ b/qtip/cli/commands/cmd_report.py @@ -9,15 +9,11 @@ import click -from qtip.cli.entry import Context from qtip.reporter.console import ConsoleReporter -pass_context = click.make_pass_decorator(Context, ensure=False) - @click.group() -@pass_context -def cli(ctx): +def cli(): """ View QTIP results""" pass @@ -25,8 +21,7 @@ def cli(ctx): @cli.command('show') @click.argument('metric') @click.option('-p', '--path', help='Path to result directory') -@pass_context -def show(ctx, metric, path): +def show(metric, path): reporter = ConsoleReporter({}) report = reporter.render(metric, path) click.echo(report) |