From 8c6899c8020cb2eed4c912dd4c9061db892dc7be Mon Sep 17 00:00:00 2001 From: BoulderBadgeDad Date: Wed, 3 Jun 2026 16:35:19 -0700 Subject: [PATCH] Lint: fix ruff B905 (zip strict=) + S110 (try/except/pass) in similar-artists worker + perf endpoint - similar_artists_worker._get_next_artist: zip(keys, row, strict=False) - log_artist_map_perf: log the exception instead of bare pass --- core/similar_artists_worker.py | 2 +- web_server.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/similar_artists_worker.py b/core/similar_artists_worker.py index 282ae360..1349b73c 100644 --- a/core/similar_artists_worker.py +++ b/core/similar_artists_worker.py @@ -298,7 +298,7 @@ class SimilarArtistsWorker: if not row: return None keys = ['id', 'name'] + list(_LIBRARY_ID_COLUMNS) - return dict(zip(keys, row)) + return dict(zip(keys, row, strict=False)) except Exception as exc: logger.debug("Similar Artists _get_next_artist failed: %s", exc) return None diff --git a/web_server.py b/web_server.py index 6fed0f1b..6009563d 100644 --- a/web_server.py +++ b/web_server.py @@ -28292,8 +28292,8 @@ def log_artist_map_perf(): try: data = request.get_json(silent=True) or {} logger.info("[ARTMAP-PERF] %s", json.dumps(data, ensure_ascii=False)) - except Exception: - pass + except Exception as e: + logger.debug("artist-map perf log failed: %s", e) return ('', 204)