(path: Path)
| 33 | |
| 34 | |
| 35 | def load_jsonl(path: Path) -> List[Dict[str, Any]]: |
| 36 | rows: List[Dict[str, Any]] = [] |
| 37 | if not path.exists(): |
| 38 | return rows |
| 39 | with path.open("r", encoding="utf-8") as handle: |
| 40 | for line in handle: |
| 41 | line = line.strip() |
| 42 | if not line: |
| 43 | continue |
| 44 | payload = json.loads(line) |
| 45 | if isinstance(payload, dict): |
| 46 | rows.append(payload) |
| 47 | return rows |
| 48 | |
| 49 | |
| 50 | def parse_date(value: Any) -> Optional[datetime]: |
no outgoing calls
no test coverage detected