mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-30 13:05:08 +00:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user