Skip to content

Commit

Permalink
Reformat files
Browse files Browse the repository at this point in the history
  • Loading branch information
wch committed Sep 5, 2024
1 parent 8740037 commit c6f9457
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion shinylive/_assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ def reporthook(count: int, block_size: int, total_size: int):
progress_size = int(count * block_size)
speed = int(progress_size / (1024 * duration))
percent = min(int(count * block_size * 100 / total_size), 100)
sys.stderr.write(f"\r{percent}%, {speed} KB/s, {progress_size / (1024 * 1024):.1f}/{total_size / (1024 * 1024):.1f} MB")
sys.stderr.write(
f"\r{percent}%, {speed} KB/s, {progress_size / (1024 * 1024):.1f}/{total_size / (1024 * 1024):.1f} MB"
)
sys.stderr.flush()
last_update_time = current_time

Expand Down
4 changes: 3 additions & 1 deletion shinylive/_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,9 @@ def download(
) -> None:
if version is None: # pyright: ignore[reportUnnecessaryComparison]
version = SHINYLIVE_ASSETS_VERSION
_assets.download_shinylive(destdir=upgrade_dir(dir), version=version, url=url, status=status)
_assets.download_shinylive(
destdir=upgrade_dir(dir), version=version, url=url, status=status
)


cleanup_help = f"Remove all versions of local assets except the currently-used version, {SHINYLIVE_ASSETS_VERSION}."
Expand Down

0 comments on commit c6f9457

Please sign in to comment.