style: turn on ruff UP and B rules and fix every finding

This commit is contained in:
imSp4rky
2026-11-25 16:34:09 -07:00
parent 1a63076df2
commit d8058a3610
264 changed files with 2950 additions and 2966 deletions
+3 -2
View File
@@ -14,6 +14,7 @@ from functools import partial
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
import pytest
import requests
from unshackle.core.config import config
from unshackle.core.constants import DOWNLOAD_CANCELLED
@@ -109,7 +110,7 @@ def test_hls_second_run_reuses_completed_segments(server, tmp_path):
# part1.bin missing -> run 1 completes part0 then dies during the download phase
ctx = make_ctx(tmp_path)
with pytest.raises(Exception):
with pytest.raises(requests.HTTPError):
HLS.download_track(make_track(server), ctx)
assert (ctx.save_dir / "segments" / "0.bin").read_bytes() == PART0
@@ -133,7 +134,7 @@ def test_hls_aes128_content_never_writes_sidecar(server, tmp_path):
# part1.bin missing -> crash mid-download, the state resume would normally preserve
ctx = make_ctx(tmp_path)
with pytest.raises(Exception):
with pytest.raises(requests.HTTPError):
HLS.download_track(make_track(server), ctx)
assert not resume.sidecar_path(ctx.save_dir).exists()