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

Function check_format

worked/example/raw/validator.py:32–36  ·  view source on GitHub ↗

Raise if the format is not in the allowed list.

(doc: dict)

Source from the content-addressed store, hash-verified

30
31
32def check_format(doc: dict) -> None:
33 """Raise if the format is not in the allowed list."""
34 fmt = doc.get("format", "")
35 if fmt not in ALLOWED_FORMATS:
36 raise ValidationError(f"Unknown format: {fmt}. Allowed: {ALLOWED_FORMATS}")
37
38
39def normalize_fields(doc: dict) -> dict:

Callers 1

validate_documentFunction · 0.85

Calls 2

ValidationErrorClass · 0.85
getMethod · 0.45

Tested by

no test coverage detected