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

Function assert_valid

graphify/validate.py:106–111  ·  view source on GitHub ↗

Raise ValueError with all errors if extraction is invalid.

(data: dict)

Source from the content-addressed store, hash-verified

104
105
106def assert_valid(data: dict) -> None:
107 """Raise ValueError with all errors if extraction is invalid."""
108 errors = validate_extraction(data)
109 if errors:
110 msg = f"Extraction JSON has {len(errors)} error(s):\n" + "\n".join(f" • {e}" for e in errors)
111 raise ValueError(msg)

Calls 2

validate_extractionFunction · 0.85
joinMethod · 0.45