Record the 2026-10-09 panel's scores, file what it named as items 170 to 177, and correct four claims it found false

This commit is contained in:
2026-10-09 13:03:51 +02:00
committed by Lillem4n
parent b9d1af6565
commit 5d85944359
5 changed files with 48 additions and 14 deletions
+3 -3
View File
@@ -5,14 +5,14 @@ from pathlib import Path
def write(path, columns, rows):
"""Write the rows as a TSV of at least two rows, each cell stripped, non-empty and free of tabs, newlines and braces."""
"""Write the rows as a TSV of at least one row, each cell stripped, non-empty and free of tabs, newlines and braces."""
lines = ["\t".join(columns)]
for row in rows:
cells = [str(row[c]).strip() for c in columns]
if not all(cells) or any(re.search(r"[\t\n{}]", c) for c in cells):
raise ValueError(f"{path}: a cell is empty or holds a tab, newline or brace: {row}")
lines.append("\t".join(cells))
if len(lines) < 3:
raise ValueError(f"{path}: has {len(lines) - 1} rows below its header; a table is at least two rows")
if len(lines) < 2:
raise ValueError(f"{path}: has no rows below its header; a table holds at least one row")
Path(path).write_text("\n".join(lines) + "\n", encoding="utf-8")
print(f"{path}: {len(lines) - 1} rows", file=sys.stderr)