MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / _check

Function _check

graphify/multigraph_compat.py:61–70  ·  view source on GitHub ↗
(name: str, func: Callable[[], bool | str])

Source from the content-addressed store, hash-verified

59
60
61def _check(name: str, func: Callable[[], bool | str]) -> CapabilityCheck:
62 try:
63 detail = func()
64 except Exception as exc:
65 return CapabilityCheck(name, False, f"{type(exc).__name__}: {exc}")
66 if detail is True:
67 return CapabilityCheck(name, True, "ok")
68 if isinstance(detail, str):
69 return CapabilityCheck(name, False, detail)
70 return CapabilityCheck(name, False, f"unexpected result {detail!r}")
71
72
73def _build_probe_graph() -> nx.MultiDiGraph:

Callers 1

Calls 1

CapabilityCheckClass · 0.85

Tested by

no test coverage detected