MCPcopy Index your code
hub / github.com/usestrix/strix / _int_stat

Function _int_stat

strix/interface/utils.py:252–256  ·  view source on GitHub ↗
(usage: dict[str, Any], key: str)

Source from the content-addressed store, hash-verified

250
251
252def _int_stat(usage: dict[str, Any], key: str) -> int:
253 try:
254 return max(0, int(usage.get(key) or 0))
255 except (TypeError, ValueError):
256 return 0
257
258
259def _float_stat(usage: dict[str, Any], key: str) -> float:

Callers 3

_detail_valueFunction · 0.85
_build_llm_usage_statsFunction · 0.85
build_tui_stats_textFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected