MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / _as_int

Function _as_int

uncommon_route/cache_support.py:491–495  ·  view source on GitHub ↗
(value: Any)

Source from the content-addressed store, hash-verified

489
490
491def _as_int(value: Any) -> int:
492 try:
493 return int(value or 0)
494 except (TypeError, ValueError):
495 return 0
496
497
498def _first_positive_int(*values: Any) -> int:

Callers 2

parse_usage_metricsFunction · 0.85
_first_positive_intFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected