fix(lint): silence ruff B007 + S110

- core/torrent_clients/transmission.py: rename unused loop var
  `attempt` to `_attempt` in the session-id renegotiation loop
  (B007 — loop var not used in body).
- core/image_cache.py: log the cleanup exception instead of
  swallowing it silently (S110 — bare try/except/pass). debug
  level since a failed tmp unlink is non-fatal; the outer
  ``raise`` still propagates the original error.

Full ruff sweep clean.
This commit is contained in:
Broque Thomas 2026-05-20 16:18:55 -07:00
parent 9b36d421ee
commit b475dc5a20
2 changed files with 3 additions and 3 deletions

View file

@ -198,8 +198,8 @@ class ImageCache:
except Exception:
try:
tmp_path.unlink(missing_ok=True)
except Exception:
pass
except Exception as cleanup_exc:
logger.debug("image_cache tmp cleanup failed: %s", cleanup_exc)
raise
if total <= 0:

View file

@ -98,7 +98,7 @@ class TransmissionAdapter:
return None
auth = (self._username, self._password) if self._username else None
payload = {'method': method, 'arguments': arguments}
for attempt in range(2):
for _attempt in range(2):
try:
with self._session_id_lock:
sid = self._session_id