ci(atlasbot): replace stale metric pushes and clean unused noqa flags

This commit is contained in:
Brad Stein 2026-04-19 16:15:02 -03:00
parent 12b3e14512
commit 5ae40c2116
2 changed files with 7 additions and 7 deletions

View File

@ -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,
*,

View File

@ -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 ""