fix: remove stale noqa and use set membership test

The refactoring reduced complexity below C901/PLR0912 thresholds,
making the noqa directive unused. Use `in` set test per PLR1714.
This commit is contained in:
Kevin Turcios 2026-04-29 02:20:05 -05:00
parent 3dfd5ffd10
commit 5f3bb4dba8

View file

@ -121,7 +121,7 @@ def tool_call_html(preview: str) -> str:
)
def render_log_html(entry: LogEntry) -> str: # noqa: C901, PLR0912
def render_log_html(entry: LogEntry) -> str:
ts = fmt_time(entry.timestamp)
src_cls = SOURCE_CLASSES.get(entry.source, "bg-gray-600")
src_label = SOURCE_LABELS.get(entry.source, entry.source[:3].upper())
@ -163,7 +163,7 @@ def render_log_html(entry: LogEntry) -> str: # noqa: C901, PLR0912
extra_div_classes = " border-t border-surface-800 mt-2 pt-1" if is_thinking else ""
is_tool = level == "tool_call" or level == "tool_result"
is_tool = level in {"tool_call", "tool_result"}
opacity = " opacity-60" if is_tool else ""
indent = " pl-4" if is_tool else ""