(path: Path)
| 139 | |
| 140 | |
| 141 | def read_table(path: Path) -> tuple[list[dict[str, str]], list[str]]: |
| 142 | with path.open(newline="", encoding="utf-8") as handle: |
| 143 | reader = csv.DictReader(handle, delimiter=detect_delimiter(path)) |
| 144 | rows = [{key: (value or "").strip() for key, value in row.items()} for row in reader] |
| 145 | return rows, list(reader.fieldnames or []) |
| 146 | |
| 147 | |
| 148 | def first_present(row: dict[str, str], names: list[str]) -> str: |
no test coverage detected