MCPcopy Create free account
hub / github.com/917Dhj/DeepPaperNote / load_record

Function load_record

scripts/lint_grounding.py:43–52  ·  view source on GitHub ↗
(value: str)

Source from the content-addressed store, hash-verified

41
42
43def load_record(value: str) -> dict[str, Any]:
44 record = maybe_load_json_record(value)
45 if record is not None:
46 return record
47 path = Path(value).expanduser()
48 if path.exists() and path.is_file():
49 data = json.loads(path.read_text(encoding="utf-8"))
50 if isinstance(data, dict):
51 return data
52 raise SystemExit(f"Expected JSON object for {value!r}.")
53
54
55def issue(code: str, severity: str = "error", **details: Any) -> dict[str, Any]:

Callers 1

mainFunction · 0.70

Calls 1

maybe_load_json_recordFunction · 0.90

Tested by

no test coverage detected