refactor(types): bring mypy to zero errors across unshackle

Fix the bugs the type errors exposed (RnetSession.send body, HLS proxy session, title cache fallback, mux progress) and gate mypy in pre-commit, warn-only in CI.
This commit is contained in:
imSp4rky
2026-10-30 20:51:21 -06:00
parent b493c9cd52
commit 7898ff6dd6
95 changed files with 810 additions and 589 deletions
+3 -2
View File
@@ -45,7 +45,7 @@ class ClearKeyCENC:
laurl: Optional[str] = None,
content_keys: Optional[dict[UUID, str]] = None,
**kwargs: Any,
):
) -> None:
kid_list: list[UUID] = []
for kid in kids or []:
if isinstance(kid, str):
@@ -279,7 +279,7 @@ class ClearKeyCENC:
config.directories.temp.mkdir(parents=True, exist_ok=True)
try:
arguments = [
arguments: list[str | Path] = [
f"input={path},stream=0,output={output_path},output_format=MP4",
"--enable_raw_key_decryption",
"--keys",
@@ -304,6 +304,7 @@ class ClearKeyCENC:
had_error = False
shaka_log_buffer = ""
assert p.stderr is not None
for line in iter(p.stderr.readline, ""):
line = line.strip()
if not line: