ci(atlasbot): replace stale metric pushes and clean unused noqa flags
This commit is contained in:
parent
12b3e14512
commit
5ae40c2116
@ -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,
|
||||
*,
|
||||
|
||||
@ -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 ""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user