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

Function _hook_strict_enabled

graphify/cli.py:1198–1207  ·  view source on GitHub ↗

Resolve strict mode: GRAPHIFY_HOOK_STRICT env overrides the baked-in flag (truthy forces on without a reinstall, falsy is the kill switch); unset defers to the flag the installed hook command carried.

(flag: bool)

Source from the content-addressed store, hash-verified

1196
1197
1198def _hook_strict_enabled(flag: bool) -> bool:
1199 """Resolve strict mode: GRAPHIFY_HOOK_STRICT env overrides the baked-in flag
1200 (truthy forces on without a reinstall, falsy is the kill switch); unset defers
1201 to the flag the installed hook command carried."""
1202 v = os.environ.get("GRAPHIFY_HOOK_STRICT", "").strip().lower()
1203 if v in ("1", "true", "yes", "on"):
1204 return True
1205 if v in ("0", "false", "no", "off"):
1206 return False
1207 return flag
1208
1209
1210def _touch_query_stamp(graph_path: "Path") -> None:

Callers 1

_run_hook_guardFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected