From ee4d514d603c15b49c3671aa9d2c8a88ea29f86d Mon Sep 17 00:00:00 2001 From: BoulderBadgeDad Date: Thu, 11 Jun 2026 16:00:07 -0700 Subject: [PATCH] CI: silence S110 on three intentional best-effort swallows (unblocks dev build) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 — ` 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. --- core/repair_jobs/acoustid_scanner.py | 2 +- core/repair_jobs/relocate.py | 3 +-- web_server.py | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/core/repair_jobs/acoustid_scanner.py b/core/repair_jobs/acoustid_scanner.py index 916829b6..16ceabda 100644 --- a/core/repair_jobs/acoustid_scanner.py +++ b/core/repair_jobs/acoustid_scanner.py @@ -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 — diff --git a/core/repair_jobs/relocate.py b/core/repair_jobs/relocate.py index 11766d75..f034b230 100644 --- a/core/repair_jobs/relocate.py +++ b/core/repair_jobs/relocate.py @@ -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 diff --git a/web_server.py b/web_server.py index c4673de9..200cea1a 100644 --- a/web_server.py +++ b/web_server.py @@ -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