Skip to content

Commit b10efaa

Browse files
committed
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.
1 parent ed9d3e4 commit b10efaa

9 files changed

Lines changed: 9 additions & 18 deletions

File tree

scripts/code.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -650,8 +650,7 @@ def table_name(r):
650650
compare_ = min(
651651
(n for n in table.keys()
652652
if all(fnmatch.fnmatchcase(k, c)
653-
for k, c in it.zip_longest(n.split(','), compare,
654-
fillvalue=''))),
653+
for k, c in zip(n.split(','), compare))),
655654
default=compare)
656655
compare_r = table.get(compare_)
657656

scripts/cov.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,8 +519,7 @@ def table_name(r):
519519
compare_ = min(
520520
(n for n in table.keys()
521521
if all(fnmatch.fnmatchcase(k, c)
522-
for k, c in it.zip_longest(n.split(','), compare,
523-
fillvalue=''))),
522+
for k, c in zip(n.split(','), compare))),
524523
default=compare)
525524
compare_r = table.get(compare_)
526525

scripts/csv.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2324,8 +2324,7 @@ def table_name(r):
23242324
compare_ = min(
23252325
(n for n in table.keys()
23262326
if all(fnmatch.fnmatchcase(k, c)
2327-
for k, c in it.zip_longest(n.split(','), compare,
2328-
fillvalue=''))),
2327+
for k, c in zip(n.split(','), compare))),
23292328
default=compare)
23302329
compare_r = table.get(compare_)
23312330

scripts/ctx.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -909,8 +909,7 @@ def table_name(r):
909909
compare_ = min(
910910
(n for n in table.keys()
911911
if all(fnmatch.fnmatchcase(k, c)
912-
for k, c in it.zip_longest(n.split(','), compare,
913-
fillvalue=''))),
912+
for k, c in zip(n.split(','), compare))),
914913
default=compare)
915914
compare_r = table.get(compare_)
916915

scripts/data.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -650,8 +650,7 @@ def table_name(r):
650650
compare_ = min(
651651
(n for n in table.keys()
652652
if all(fnmatch.fnmatchcase(k, c)
653-
for k, c in it.zip_longest(n.split(','), compare,
654-
fillvalue=''))),
653+
for k, c in zip(n.split(','), compare))),
655654
default=compare)
656655
compare_r = table.get(compare_)
657656

scripts/perf.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,8 +1008,7 @@ def table_name(r):
10081008
compare_ = min(
10091009
(n for n in table.keys()
10101010
if all(fnmatch.fnmatchcase(k, c)
1011-
for k, c in it.zip_longest(n.split(','), compare,
1012-
fillvalue=''))),
1011+
for k, c in zip(n.split(','), compare))),
10131012
default=compare)
10141013
compare_r = table.get(compare_)
10151014

scripts/perfbd.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -982,8 +982,7 @@ def table_name(r):
982982
compare_ = min(
983983
(n for n in table.keys()
984984
if all(fnmatch.fnmatchcase(k, c)
985-
for k, c in it.zip_longest(n.split(','), compare,
986-
fillvalue=''))),
985+
for k, c in zip(n.split(','), compare))),
987986
default=compare)
988987
compare_r = table.get(compare_)
989988

scripts/stack.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -650,8 +650,7 @@ def table_name(r):
650650
compare_ = min(
651651
(n for n in table.keys()
652652
if all(fnmatch.fnmatchcase(k, c)
653-
for k, c in it.zip_longest(n.split(','), compare,
654-
fillvalue=''))),
653+
for k, c in zip(n.split(','), compare))),
655654
default=compare)
656655
compare_r = table.get(compare_)
657656

scripts/structs.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -798,8 +798,7 @@ def table_name(r):
798798
compare_ = min(
799799
(n for n in table.keys()
800800
if all(fnmatch.fnmatchcase(k, c)
801-
for k, c in it.zip_longest(n.split(','), compare,
802-
fillvalue=''))),
801+
for k, c in zip(n.split(','), compare))),
803802
default=compare)
804803
compare_r = table.get(compare_)
805804

0 commit comments

Comments
 (0)