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 -3
View File
@@ -4,14 +4,14 @@ Keep this allowlist separate from title.data: that dict can contain credentials,
playback URLs and other private service state which must never cross the API.
"""
from typing import Any, Dict, Optional
from typing import Any
def availability_metadata(value: Any) -> Optional[Dict[str, Any]]:
def availability_metadata(value: Any) -> dict[str, Any] | None:
"""Return only well-typed display fields; absent metadata remains absent."""
if not isinstance(value, dict):
return None
result: Dict[str, Any] = {}
result: dict[str, Any] = {}
if isinstance(value.get("paid"), bool):
result["paid"] = value["paid"]
access = value.get("access")