Skip to content

Commit 48b213c

Browse files
authored
Merge pull request #103 from ImageMarkup/fix-progress-message
Clean up the progress message
2 parents 6c8ae0d + e700630 commit 48b213c

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

isic_cli/cli/image.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,11 @@ def signal_handler(signum, frame):
145145

146146
with Progress(console=Console(file=sys.stderr)) as progress:
147147
if limit == 0:
148-
task = progress.add_task(
149-
f"Downloading images ({nice_num_images} files, {nice_total_size})",
150-
total=download_num_images,
151-
)
148+
message = f"Downloading images + metadata ({nice_num_images} files, {nice_total_size})"
152149
else:
153-
task = progress.add_task(
154-
f"Downloading images (and metadata) ({nice_num_images} total)",
155-
total=download_num_images,
156-
)
150+
message = f"Downloading images + metadata ({nice_num_images} files)"
151+
152+
task = progress.add_task(message, total=download_num_images)
157153

158154
images_iterator = itertools.islice(
159155
get_images(ctx.session, search, collections), download_num_images

tests/test_cli_image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def test_image_download_no_size_info_with_limit(cli_run, outdir):
9595
result = cli_run(["image", "download", outdir, "--limit", "1"])
9696
assert result.exit_code == 0
9797
assert "2.0 MB" not in result.output
98-
assert "1 total" in result.output
98+
assert "1 files" in result.output
9999

100100

101101
@pytest.mark.usefixtures("_isolated_filesystem", "_mock_images")

0 commit comments

Comments
 (0)