From 18bb25f1408c09bd7d71cc5c24959269da80e962 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Mon, 6 Jul 2026 19:09:29 -0400 Subject: [PATCH] fix: ruff C416 (dict() over comprehension) + frontend test playlistIds rename MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - heads.py: conf_map = dict(conf) instead of a dict comprehension (ruff C416). - postCard.spec.js: the modal-playlist rename (postImageIds→playlistIds) missed this frontend test (grep was src-only); update the expected call args. Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_01CDgx8bQS5YrGRK76v8HUnM --- backend/app/services/ml/heads.py | 2 +- frontend/test/components/postCard.spec.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/app/services/ml/heads.py b/backend/app/services/ml/heads.py index 38b8eaf..ae85b46 100644 --- a/backend/app/services/ml/heads.py +++ b/backend/app/services/ml/heads.py @@ -197,7 +197,7 @@ def _head_fingerprints(session: Session, tag_ids: list[int]) -> dict[int, str]: .where(TagPositiveConfirmation.tag_id.in_(tag_ids)) .group_by(TagPositiveConfirmation.tag_id) ).all() - conf_map = {t: c for t, c in conf} + conf_map = dict(conf) out = {} for t in tag_ids: pc, pm = pos_map.get(t, (0, None)) diff --git a/frontend/test/components/postCard.spec.js b/frontend/test/components/postCard.spec.js index 2500b02..7e65b9b 100644 --- a/frontend/test/components/postCard.spec.js +++ b/frontend/test/components/postCard.spec.js @@ -80,6 +80,6 @@ describe('PostCard', () => { const w = mountComponent(PostCard, { props: { post }, pinia }) await w.find('.fc-post-card__hero').trigger('click') await flushPromises() - expect(openSpy).toHaveBeenCalledWith(10, { postImageIds: [10, 11] }) + expect(openSpy).toHaveBeenCalledWith(10, { playlistIds: [10, 11] }) }) })