From 60dec6b77de05922ea30612a2c3bb3a10708daa5 Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Sat, 24 Jan 2026 04:53:02 -0600 Subject: [PATCH] scripts: csv.py: Tweaked expr-less -F to still typecheck I was expecting -ba -Fa to sort numerically, but it was not. Turns out hidden field fields (-F/--hidden-field) without exprs were never typechecked. This is not an issue for non-hidden field fields (-f/--field), because we typecheck these explicitly in compile. --- scripts/csv.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/csv.py b/scripts/csv.py index 9b9e7b01..59b443e1 100755 --- a/scripts/csv.py +++ b/scripts/csv.py @@ -2619,7 +2619,9 @@ def main(csv_paths, *, if v is not None] exprs = [(k, v) for k, v in it.chain( - ((k, v) for (k, v), hidden in (fields or [])), + # expr-less fields at least imply typechecking + ((k, v) if v is not None else (k, CsvExpr(k)) + for (k, v), hidden in (fields or [])), ((k, v) for (k, v), reverse in (sort or [])), ((k, v) for (k, v), reverse in (hot or []))) if v is not None]