(path: Path, rows: list[dict[str, Any]], fieldnames: list[str])
| 34 | |
| 35 | |
| 36 | def write_tsv(path: Path, rows: list[dict[str, Any]], fieldnames: list[str]) -> None: |
| 37 | path.parent.mkdir(parents=True, exist_ok=True) |
| 38 | with path.open("w", newline="", encoding="utf-8") as handle: |
| 39 | writer = csv.DictWriter( |
| 40 | handle, fieldnames=fieldnames, delimiter="\t", extrasaction="ignore" |
| 41 | ) |
| 42 | writer.writeheader() |
| 43 | writer.writerows(rows) |
| 44 | |
| 45 | |
| 46 | def shell_join(cmd: list[str | Path]) -> str: |
no outgoing calls
no test coverage detected