Lint python

This commit is contained in:
Andras Schmelczer 2026-01-25 21:46:02 +00:00
parent a2e4c29839
commit 86690f41f1
7 changed files with 1367 additions and 17 deletions

View file

@ -35,13 +35,16 @@ def download_with_progress(url: str, output_path: Path) -> None:
response.raise_for_status() # pyright: ignore[reportUnusedCallResult]
total = int(response.headers.get("content-length", 0))
with open(output_path, "wb") as f, tqdm(
total=total,
unit="B",
unit_scale=True,
unit_divisor=1024,
desc="Downloading",
) as pbar:
with (
open(output_path, "wb") as f,
tqdm(
total=total,
unit="B",
unit_scale=True,
unit_divisor=1024,
desc="Downloading",
) as pbar,
):
for chunk in response.iter_bytes(chunk_size=8192):
f.write(chunk)
pbar.update(len(chunk))