From 5ae40c21162cf3b320906829bcb08ff539ec88b1 Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Sun, 19 Apr 2026 16:15:02 -0300 Subject: [PATCH] ci(atlasbot): replace stale metric pushes and clean unused noqa flags --- atlasbot/engine/answerer.py | 2 +- atlasbot/snapshot/builder.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/atlasbot/engine/answerer.py b/atlasbot/engine/answerer.py index 1906537..c4cb057 100644 --- a/atlasbot/engine/answerer.py +++ b/atlasbot/engine/answerer.py @@ -142,7 +142,7 @@ class AnswerEngine: self._snapshot = snapshot self._store = ClaimStore(settings.state_db_path, settings.conversation_ttl_sec) - async def answer( # noqa: C901, PLR0912, PLR0913, PLR0915 + async def answer( # noqa: C901 self, question: str, *, diff --git a/atlasbot/snapshot/builder.py b/atlasbot/snapshot/builder.py index 7543197..3238b89 100644 --- a/atlasbot/snapshot/builder.py +++ b/atlasbot/snapshot/builder.py @@ -796,7 +796,7 @@ def _append_namespace_nodes(lines: list[str], summary: dict[str, Any]) -> None: lines.append("namespace_nodes_top: " + "; ".join(parts)) -def _append_node_pods(lines: list[str], summary: dict[str, Any]) -> None: # noqa: C901, PLR0912 +def _append_node_pods(lines: list[str], summary: dict[str, Any]) -> None: # noqa: C901 node_pods = summary.get("node_pods") if not isinstance(node_pods, list) or not node_pods: return @@ -1156,7 +1156,7 @@ def _append_namespace_io_net(lines: list[str], summary: dict[str, Any]) -> None: lines.append("namespace_io_top: " + "; ".join(parts)) -def _append_pod_usage(lines: list[str], summary: dict[str, Any]) -> None: # noqa: C901, PLR0912 +def _append_pod_usage(lines: list[str], summary: dict[str, Any]) -> None: # noqa: C901 metrics = summary.get("metrics") if isinstance(summary.get("metrics"), dict) else {} cpu_top = metrics.get("pod_cpu_top") if isinstance(metrics.get("pod_cpu_top"), list) else [] cpu_top_node = ( @@ -1423,7 +1423,7 @@ def _append_workloads(lines: list[str], summary: dict[str, Any]) -> None: lines.append("workloads_top: " + "; ".join(parts)) -def _append_topology(lines: list[str], summary: dict[str, Any]) -> None: # noqa: C901, PLR0912 +def _append_topology(lines: list[str], summary: dict[str, Any]) -> None: # noqa: C901 topology = summary.get("topology") if isinstance(summary.get("topology"), dict) else {} if not topology: return @@ -1599,7 +1599,7 @@ def _append_node_load_summary(lines: list[str], summary: dict[str, Any]) -> None lines.append("node_load_outliers: " + _format_names(names)) -def _append_hardware_usage(lines: list[str], summary: dict[str, Any]) -> None: # noqa: C901, PLR0912 +def _append_hardware_usage(lines: list[str], summary: dict[str, Any]) -> None: # noqa: C901 usage = summary.get("hardware_usage_avg") if not isinstance(usage, list) or not usage: return @@ -1782,7 +1782,7 @@ def _capacity_headroom_parts(entries: list[dict[str, Any]]) -> list[str]: return parts -def _append_namespace_capacity_summary( # noqa: C901, PLR0912 +def _append_namespace_capacity_summary( # noqa: C901 lines: list[str], summary: dict[str, Any], ) -> None: @@ -1931,7 +1931,7 @@ def _append_cross_stats(lines: list[str], summary: dict[str, Any]) -> None: # n lines.append(f"cross_pvc_usage: {namespace}/{pvc} used={_format_float(used)}") -def summary_text(snapshot: dict[str, Any] | None) -> str: # noqa: PLR0915 +def summary_text(snapshot: dict[str, Any] | None) -> str: summary = build_summary(snapshot) if not summary: return ""