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

Function _global_setting_ids

scripts/theme_gate.py:427–449  ·  view source on GitHub ↗
(root: Path)

Source from the content-addressed store, hash-verified

425
426
427def _global_setting_ids(root: Path) -> set[str]:
428 p = root / "config" / "settings_schema.json"
429 if not p.is_file():
430 return set()
431 try:
432 data = json.loads(_read(p))
433 except ValueError:
434 return set()
435 ids: set[str] = set()
436
437 def walk(o: object) -> None:
438 if isinstance(o, dict):
439 sid = o.get("id")
440 if isinstance(sid, str) and "type" in o:
441 ids.add(sid)
442 for v in o.values():
443 walk(v)
444 elif isinstance(o, list):
445 for v in o:
446 walk(v)
447
448 walk(data)
449 return ids
450
451
452def _metafield_defs(root: Path) -> set[str] | None:

Callers 1

measureFunction · 0.85

Calls 2

_readFunction · 0.70
walkFunction · 0.70

Tested by

no test coverage detected