MCPcopy Create free account
hub / github.com/ResearAI/DeepReviewer-v2 / _load_annotations_payload

Function _load_annotations_payload

deepreview/runner.py:158–168  ·  view source on GitHub ↗
(path: Path | None)

Source from the content-addressed store, hash-verified

156
157
158def _load_annotations_payload(path: Path | None) -> list[dict[str, Any]]:
159 if path is None or not path.exists():
160 return []
161 try:
162 payload = read_json(path)
163 except Exception:
164 return []
165
166 if isinstance(payload, dict):
167 return _coerce_dict_rows(payload.get('annotations'))
168 return _coerce_dict_rows(payload)
169
170
171def _token_usage_payload_from_state(state: Any) -> dict[str, int]:

Callers 1

Calls 3

read_jsonFunction · 0.90
_coerce_dict_rowsFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected