From b10efaa00654a1f65a0b7ba9d1edd47505c5d68b Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Thu, 5 Mar 2026 23:24:43 -0600 Subject: [PATCH] scripts: Relaxed -C/--compare to match eagerly I.e. zip_longest -> zip This is for better consistency with other scripts where we treat shortened names as equivalent to being padded with globs. Padding with globs is slightly more flexible, and is convenient when scripts append special fields that the user may not expect (x/y after defines in plot.py/plotmpl.py for example). The alternative behavior of rejecting longer-than-expected names isn't super useful. --- scripts/code.py | 3 +-- scripts/cov.py | 3 +-- scripts/csv.py | 3 +-- scripts/ctx.py | 3 +-- scripts/data.py | 3 +-- scripts/perf.py | 3 +-- scripts/perfbd.py | 3 +-- scripts/stack.py | 3 +-- scripts/structs.py | 3 +-- 9 files changed, 9 insertions(+), 18 deletions(-) diff --git a/scripts/code.py b/scripts/code.py index 9947530c..632118bb 100755 --- a/scripts/code.py +++ b/scripts/code.py @@ -650,8 +650,7 @@ def table(Result, results, diff_results=None, *, compare_ = min( (n for n in table.keys() if all(fnmatch.fnmatchcase(k, c) - for k, c in it.zip_longest(n.split(','), compare, - fillvalue=''))), + for k, c in zip(n.split(','), compare))), default=compare) compare_r = table.get(compare_) diff --git a/scripts/cov.py b/scripts/cov.py index 2f346c8e..bd0ec556 100755 --- a/scripts/cov.py +++ b/scripts/cov.py @@ -519,8 +519,7 @@ def table(Result, results, diff_results=None, *, compare_ = min( (n for n in table.keys() if all(fnmatch.fnmatchcase(k, c) - for k, c in it.zip_longest(n.split(','), compare, - fillvalue=''))), + for k, c in zip(n.split(','), compare))), default=compare) compare_r = table.get(compare_) diff --git a/scripts/csv.py b/scripts/csv.py index f6061883..b37da6d7 100755 --- a/scripts/csv.py +++ b/scripts/csv.py @@ -2324,8 +2324,7 @@ def table(Result, results, diff_results=None, *, compare_ = min( (n for n in table.keys() if all(fnmatch.fnmatchcase(k, c) - for k, c in it.zip_longest(n.split(','), compare, - fillvalue=''))), + for k, c in zip(n.split(','), compare))), default=compare) compare_r = table.get(compare_) diff --git a/scripts/ctx.py b/scripts/ctx.py index 096eb31a..c9d7c72a 100755 --- a/scripts/ctx.py +++ b/scripts/ctx.py @@ -909,8 +909,7 @@ def table(Result, results, diff_results=None, *, compare_ = min( (n for n in table.keys() if all(fnmatch.fnmatchcase(k, c) - for k, c in it.zip_longest(n.split(','), compare, - fillvalue=''))), + for k, c in zip(n.split(','), compare))), default=compare) compare_r = table.get(compare_) diff --git a/scripts/data.py b/scripts/data.py index 7790f31f..dd4c9026 100755 --- a/scripts/data.py +++ b/scripts/data.py @@ -650,8 +650,7 @@ def table(Result, results, diff_results=None, *, compare_ = min( (n for n in table.keys() if all(fnmatch.fnmatchcase(k, c) - for k, c in it.zip_longest(n.split(','), compare, - fillvalue=''))), + for k, c in zip(n.split(','), compare))), default=compare) compare_r = table.get(compare_) diff --git a/scripts/perf.py b/scripts/perf.py index 63744f35..7fe46dc2 100755 --- a/scripts/perf.py +++ b/scripts/perf.py @@ -1008,8 +1008,7 @@ def table(Result, results, diff_results=None, *, compare_ = min( (n for n in table.keys() if all(fnmatch.fnmatchcase(k, c) - for k, c in it.zip_longest(n.split(','), compare, - fillvalue=''))), + for k, c in zip(n.split(','), compare))), default=compare) compare_r = table.get(compare_) diff --git a/scripts/perfbd.py b/scripts/perfbd.py index d5a4794f..36f2697e 100755 --- a/scripts/perfbd.py +++ b/scripts/perfbd.py @@ -982,8 +982,7 @@ def table(Result, results, diff_results=None, *, compare_ = min( (n for n in table.keys() if all(fnmatch.fnmatchcase(k, c) - for k, c in it.zip_longest(n.split(','), compare, - fillvalue=''))), + for k, c in zip(n.split(','), compare))), default=compare) compare_r = table.get(compare_) diff --git a/scripts/stack.py b/scripts/stack.py index d854fc95..e56aff3d 100755 --- a/scripts/stack.py +++ b/scripts/stack.py @@ -650,8 +650,7 @@ def table(Result, results, diff_results=None, *, compare_ = min( (n for n in table.keys() if all(fnmatch.fnmatchcase(k, c) - for k, c in it.zip_longest(n.split(','), compare, - fillvalue=''))), + for k, c in zip(n.split(','), compare))), default=compare) compare_r = table.get(compare_) diff --git a/scripts/structs.py b/scripts/structs.py index bba5511f..3e8b223b 100755 --- a/scripts/structs.py +++ b/scripts/structs.py @@ -798,8 +798,7 @@ def table(Result, results, diff_results=None, *, compare_ = min( (n for n in table.keys() if all(fnmatch.fnmatchcase(k, c) - for k, c in it.zip_longest(n.split(','), compare, - fillvalue=''))), + for k, c in zip(n.split(','), compare))), default=compare) compare_r = table.get(compare_)