Skip to content

Commit b26bb99

Browse files
committed
Fix artifact list
1 parent de4e0e6 commit b26bb99

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/simvue_cli/cli/__init__.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1518,6 +1518,7 @@ def delete_storage(ctx, storage_ids: list[str] | None, interactive: bool) -> Non
15181518
@click.pass_context
15191519
@click.option(
15201520
"--format",
1521+
"table_format",
15211522
type=click.Choice(list(tabulate._table_formats.keys())),
15221523
help="Display as table with output format",
15231524
default=None,
@@ -1545,7 +1546,7 @@ def delete_storage(ctx, storage_ids: list[str] | None, interactive: bool) -> Non
15451546
@click.option("--enabled", is_flag=True, help="Show if storage is enabled")
15461547
def list_storages(
15471548
ctx,
1548-
format: str,
1549+
table_format: str,
15491550
backend: bool,
15501551
tenant_usable: bool,
15511552
default: bool,
@@ -1575,7 +1576,7 @@ def list_storages(
15751576
storages,
15761577
plain_text=ctx.obj["plain"],
15771578
enumerate_=enumerate_,
1578-
format=format,
1579+
format=table_format,
15791580
)
15801581
click.echo(table)
15811582

@@ -1619,6 +1620,7 @@ def simvue_artifact(ctx):
16191620
@click.pass_context
16201621
@click.option(
16211622
"--format",
1623+
"table_format",
16221624
type=click.Choice(list(tabulate._table_formats.keys())),
16231625
help="Display as table with output format",
16241626
default=None,
@@ -1666,10 +1668,9 @@ def simvue_artifact(ctx):
16661668
show_default=True,
16671669
)
16681670
@click.option("--reverse", help="Reverse ordering", default=False, is_flag=True)
1669-
@click.pass_context
16701671
def artifact_list(
16711672
ctx,
1672-
format_: str,
1673+
table_format: str | None,
16731674
enumerate_: bool,
16741675
original_path: bool,
16751676
storage: bool,
@@ -1710,7 +1711,7 @@ def artifact_list(
17101711
storages,
17111712
plain_text=ctx.obj["plain"],
17121713
enumerate_=enumerate_,
1713-
format=format,
1714+
format=table_format,
17141715
)
17151716
click.echo(table)
17161717

tests/test_command_line_interface.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,9 @@ def test_artifact_list(create_test_run: tuple[simvue.Run, dict]) -> None:
337337
"--mime-type",
338338
"--count=20",
339339
"--enumerate",
340-
f"--format=simple"
341-
]
340+
"--format=simple"
341+
],
342+
catch_exceptions=False
342343
)
343344
assert result.exit_code == 0, result.output
344345
assert run_data["file_1"] in result.output

0 commit comments

Comments
 (0)