(v: str)
| 897 | .replace("'", "'") |
| 898 | ) |
| 899 | |
| 900 | def _read_jsonl_tail(path: Path, *, max_lines: int) -> list[dict]: |
| 901 | if not path.exists(): |
| 902 | return [] |
| 903 | lines = path.read_text(encoding="utf-8").splitlines()[-max_lines:] |
| 904 | out: list[dict] = [] |
| 905 | for ln in lines: |
| 906 | if not ln.strip(): |
| 907 | continue |
| 908 | try: |
| 909 | rec = json.loads(ln) |
no outgoing calls
no test coverage detected