(payload: Any, output: str | Path | None)
| 206 | |
| 207 | |
| 208 | def _emit_json(payload: Any, output: str | Path | None) -> int: |
| 209 | rendered = json.dumps(payload, ensure_ascii=False, indent=2) |
| 210 | if output: |
| 211 | Path(output).write_text(rendered + "\n", encoding="utf-8") |
| 212 | else: |
| 213 | print(rendered) |
| 214 | return 0 |
| 215 | |
| 216 | |
| 217 | def _write_csv(path: Path, rows: list[dict[str, Any]]) -> None: |
no outgoing calls
no test coverage detected