(path: Path | None)
| 156 | |
| 157 | |
| 158 | def _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 | |
| 171 | def _token_usage_payload_from_state(state: Any) -> dict[str, int]: |
no test coverage detected