From 3d7f60a6e3cfa750dff64aaed3e5f5c23aa42ed6 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Tue, 30 Jun 2026 13:52:16 -0400 Subject: [PATCH] fix(lint): use dict() not a dict-comprehension in tag_stats (C416) Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01Ttrj5P7upUTueSfoJcxEqa --- backend/app/api/tags.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/app/api/tags.py b/backend/app/api/tags.py index 97e5e30..ec9990a 100644 --- a/backend/app/api/tags.py +++ b/backend/app/api/tags.py @@ -127,15 +127,15 @@ async def tag_stats(tag_id: int): tag = await session.get(Tag, tag_id) if tag is None: return jsonify({"error": "not found"}), 404 - by_source = { - src: n for src, n in ( + by_source = dict( + ( await session.execute( select(image_tag.c.source, func.count()) .where(image_tag.c.tag_id == tag_id) .group_by(image_tag.c.source) ) ).all() - } + ) rejected = ( await session.execute( select(func.count())