CI: silence S110 on three intentional best-effort swallows (unblocks dev build)

The dev-nightly build runs `ruff check .` before "Build and push to GHCR" in the
same job, so the three S110 (try/except/pass) errors introduced since the last
green build (ce6ce4d) failed the lint step and SKIPPED the image push entirely —
every dev-nightly since #704 went red, so the dev image was never rebuilt and none
of the recent fixes (incl. the #852 WebSocket login-bypass fix) ever shipped to
the image users pull.

All three are deliberate best-effort swallows; annotate them with the repo's
existing `# noqa: S110 — <reason>` convention rather than adding dead logging:
- relocate.py: tag write is best-effort (re-import re-derives tags)
- acoustid_scanner.py: verification-status tag is optional context
- web_server.py: audio-duration probe falls through to 0

ruff check . + compileall now clean; pytest already passed in CI at ce6ce4d.
This commit is contained in:
BoulderBadgeDad 2026-06-11 16:00:07 -07:00
parent 26b27eb441
commit ee4d514d60
3 changed files with 3 additions and 4 deletions

View file

@ -233,7 +233,7 @@ class AcoustIDScannerJob(RepairJob):
try:
from core.tag_writer import read_file_tags as _rft
file_verif_status = (_rft(fpath) or {}).get('verification_status')
except Exception:
except Exception: # noqa: S110 — verification tag is optional context; None is fine
pass
if file_verif_status == 'human_verified':
# The user explicitly confirmed this file via the review queue —

View file

@ -55,8 +55,7 @@ def relocate_mismatch_to_staging(
if tag_updates:
try:
write_tags(resolved_path, tag_updates)
except Exception:
# Tags are best-effort — re-import re-derives them from the source.
except Exception: # noqa: S110 — tags are best-effort; re-import re-derives them
# The relocation itself is the point, so don't abort over a tag write.
pass

View file

@ -7677,7 +7677,7 @@ def _audio_file_duration_ms(path):
mf = mutagen.File(path)
if mf and mf.info and getattr(mf.info, 'length', 0):
return int(mf.info.length * 1000)
except Exception:
except Exception: # noqa: S110 — duration probe is best-effort; fall through to 0
pass
return 0