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
+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