Misc. ruff fixes.

This commit is contained in:
2026-05-25 02:22:55 +00:00
parent 8d3e872d41
commit 6115a3ff0a
6 changed files with 36 additions and 29 deletions
+4 -2
View File
@@ -188,10 +188,12 @@ def main() -> None:
zips = find_releasable_zips()
if not zips:
raise FileNotFoundError(
print(
"No clean-versioned ZIPs found in build/.\n"
"Run scripts/winbuild.py first."
"Run scripts/guibuild.py first.",
file=sys.stderr,
)
sys.exit(1)
# Validate all dist files exist before touching Gitea
dist_files: dict[str, list[Path]] = {}
+1 -2
View File
@@ -86,8 +86,7 @@ def parse_torrent(filepath: Path) -> TorrentInfo | None:
"""
try:
with Path(filepath).open("rb") as f:
data = bencodepy.decode(f.read())
data = bencodepy.decode(Path(filepath).read_bytes())
except (OSError, ValueError, TypeError) as e:
print(f"Error parsing {filepath}: {e}")
return None