Skip to content

Commit 043d826

Browse files
author
Esteban Echeverry
committed
Usar la librería tabulate en los reportes
1 parent 18c699b commit 043d826

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

taskit/infrastructure/cli/report.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import click
2+
from tabulate import tabulate
23

34

45
@click.group()
@@ -11,13 +12,11 @@ def report(obj):
1112
@click.pass_obj
1213
def tasks(obj):
1314
result = obj.state_reporter.list_tasks()
14-
for task_dict in result:
15-
click.echo(task_dict)
15+
click.echo(tabulate(result))
1616

1717

1818
@report.command()
1919
@click.pass_obj
2020
def projects(obj):
2121
result = obj.state_reporter.list_projects()
22-
for project_dict in result:
23-
click.echo(project_dict)
22+
click.echo(tabulate(result))

0 commit comments

Comments
 (0)