diff --git a/scripts/code.py b/scripts/code.py index e65d76e9..23fe2945 100755 --- a/scripts/code.py +++ b/scripts/code.py @@ -769,11 +769,12 @@ def table(Result, results, diff_results=None, *, # find the best widths, note that column 0 contains the names and is # handled a bit differently widths = co.defaultdict(lambda: 7, {0: 7}) - notes = co.defaultdict(lambda: 0) + nwidths = co.defaultdict(lambda: 0) for line in lines: for i, x in enumerate(line): widths[i] = max(widths[i], ((len(x[0])+1+4-1)//4)*4-1) - notes[i] = max(notes[i], 1+2*len(x[1])+sum(len(n) for n in x[1])) + if i != len(line)-1: + nwidths[i] = max(nwidths[i], 1+sum(2+len(n) for n in x[1])) # print our table for line in lines: @@ -781,7 +782,7 @@ def table(Result, results, diff_results=None, *, widths[0], line[0][0], ' '.join('%*s%-*s' % ( widths[i], x[0], - notes[i], ' (%s)' % ', '.join(x[1]) if x[1] else '') + nwidths[i], ' (%s)' % ', '.join(x[1]) if x[1] else '') for i, x in enumerate(line[1:], 1)))) diff --git a/scripts/cov.py b/scripts/cov.py index 730c7ff8..11c4e59d 100755 --- a/scripts/cov.py +++ b/scripts/cov.py @@ -673,11 +673,12 @@ def table(Result, results, diff_results=None, *, # find the best widths, note that column 0 contains the names and is # handled a bit differently widths = co.defaultdict(lambda: 7, {0: 7}) - notes = co.defaultdict(lambda: 0) + nwidths = co.defaultdict(lambda: 0) for line in lines: for i, x in enumerate(line): widths[i] = max(widths[i], ((len(x[0])+1+4-1)//4)*4-1) - notes[i] = max(notes[i], 1+2*len(x[1])+sum(len(n) for n in x[1])) + if i != len(line)-1: + nwidths[i] = max(nwidths[i], 1+sum(2+len(n) for n in x[1])) # print our table for line in lines: @@ -685,7 +686,7 @@ def table(Result, results, diff_results=None, *, widths[0], line[0][0], ' '.join('%*s%-*s' % ( widths[i], x[0], - notes[i], ' (%s)' % ', '.join(x[1]) if x[1] else '') + nwidths[i], ' (%s)' % ', '.join(x[1]) if x[1] else '') for i, x in enumerate(line[1:], 1)))) diff --git a/scripts/csv.py b/scripts/csv.py index 582f0d70..07374c56 100755 --- a/scripts/csv.py +++ b/scripts/csv.py @@ -1685,11 +1685,12 @@ def table(Result, results, diff_results=None, *, # find the best widths, note that column 0 contains the names and is # handled a bit differently widths = co.defaultdict(lambda: 7, {0: 7}) - notes = co.defaultdict(lambda: 0) + nwidths = co.defaultdict(lambda: 0) for line in lines: for i, x in enumerate(line): widths[i] = max(widths[i], ((len(x[0])+1+4-1)//4)*4-1) - notes[i] = max(notes[i], 1+2*len(x[1])+sum(len(n) for n in x[1])) + if i != len(line)-1: + nwidths[i] = max(nwidths[i], 1+sum(2+len(n) for n in x[1])) # print our table for line in lines: @@ -1697,7 +1698,7 @@ def table(Result, results, diff_results=None, *, widths[0], line[0][0], ' '.join('%*s%-*s' % ( widths[i], x[0], - notes[i], ' (%s)' % ', '.join(x[1]) if x[1] else '') + nwidths[i], ' (%s)' % ', '.join(x[1]) if x[1] else '') for i, x in enumerate(line[1:], 1)))) diff --git a/scripts/ctx.py b/scripts/ctx.py index 2e82a21d..e77c8c62 100755 --- a/scripts/ctx.py +++ b/scripts/ctx.py @@ -989,11 +989,12 @@ def table(Result, results, diff_results=None, *, # find the best widths, note that column 0 contains the names and is # handled a bit differently widths = co.defaultdict(lambda: 7, {0: 7}) - notes = co.defaultdict(lambda: 0) + nwidths = co.defaultdict(lambda: 0) for line in lines: for i, x in enumerate(line): widths[i] = max(widths[i], ((len(x[0])+1+4-1)//4)*4-1) - notes[i] = max(notes[i], 1+2*len(x[1])+sum(len(n) for n in x[1])) + if i != len(line)-1: + nwidths[i] = max(nwidths[i], 1+sum(2+len(n) for n in x[1])) # print our table for line in lines: @@ -1001,7 +1002,7 @@ def table(Result, results, diff_results=None, *, widths[0], line[0][0], ' '.join('%*s%-*s' % ( widths[i], x[0], - notes[i], ' (%s)' % ', '.join(x[1]) if x[1] else '') + nwidths[i], ' (%s)' % ', '.join(x[1]) if x[1] else '') for i, x in enumerate(line[1:], 1)))) diff --git a/scripts/data.py b/scripts/data.py index 3b5fd438..69bf9a07 100755 --- a/scripts/data.py +++ b/scripts/data.py @@ -769,11 +769,12 @@ def table(Result, results, diff_results=None, *, # find the best widths, note that column 0 contains the names and is # handled a bit differently widths = co.defaultdict(lambda: 7, {0: 7}) - notes = co.defaultdict(lambda: 0) + nwidths = co.defaultdict(lambda: 0) for line in lines: for i, x in enumerate(line): widths[i] = max(widths[i], ((len(x[0])+1+4-1)//4)*4-1) - notes[i] = max(notes[i], 1+2*len(x[1])+sum(len(n) for n in x[1])) + if i != len(line)-1: + nwidths[i] = max(nwidths[i], 1+sum(2+len(n) for n in x[1])) # print our table for line in lines: @@ -781,7 +782,7 @@ def table(Result, results, diff_results=None, *, widths[0], line[0][0], ' '.join('%*s%-*s' % ( widths[i], x[0], - notes[i], ' (%s)' % ', '.join(x[1]) if x[1] else '') + nwidths[i], ' (%s)' % ', '.join(x[1]) if x[1] else '') for i, x in enumerate(line[1:], 1)))) diff --git a/scripts/perf.py b/scripts/perf.py index f63c8d7f..9e3f19a8 100755 --- a/scripts/perf.py +++ b/scripts/perf.py @@ -1075,11 +1075,12 @@ def table(Result, results, diff_results=None, *, # find the best widths, note that column 0 contains the names and is # handled a bit differently widths = co.defaultdict(lambda: 7, {0: 7}) - notes = co.defaultdict(lambda: 0) + nwidths = co.defaultdict(lambda: 0) for line in lines: for i, x in enumerate(line): widths[i] = max(widths[i], ((len(x[0])+1+4-1)//4)*4-1) - notes[i] = max(notes[i], 1+2*len(x[1])+sum(len(n) for n in x[1])) + if i != len(line)-1: + nwidths[i] = max(nwidths[i], 1+sum(2+len(n) for n in x[1])) # print our table for line in lines: @@ -1087,7 +1088,7 @@ def table(Result, results, diff_results=None, *, widths[0], line[0][0], ' '.join('%*s%-*s' % ( widths[i], x[0], - notes[i], ' (%s)' % ', '.join(x[1]) if x[1] else '') + nwidths[i], ' (%s)' % ', '.join(x[1]) if x[1] else '') for i, x in enumerate(line[1:], 1)))) diff --git a/scripts/perfbd.py b/scripts/perfbd.py index 88cb941f..5c0d0a6b 100755 --- a/scripts/perfbd.py +++ b/scripts/perfbd.py @@ -1038,11 +1038,12 @@ def table(Result, results, diff_results=None, *, # find the best widths, note that column 0 contains the names and is # handled a bit differently widths = co.defaultdict(lambda: 7, {0: 7}) - notes = co.defaultdict(lambda: 0) + nwidths = co.defaultdict(lambda: 0) for line in lines: for i, x in enumerate(line): widths[i] = max(widths[i], ((len(x[0])+1+4-1)//4)*4-1) - notes[i] = max(notes[i], 1+2*len(x[1])+sum(len(n) for n in x[1])) + if i != len(line)-1: + nwidths[i] = max(nwidths[i], 1+sum(2+len(n) for n in x[1])) # print our table for line in lines: @@ -1050,7 +1051,7 @@ def table(Result, results, diff_results=None, *, widths[0], line[0][0], ' '.join('%*s%-*s' % ( widths[i], x[0], - notes[i], ' (%s)' % ', '.join(x[1]) if x[1] else '') + nwidths[i], ' (%s)' % ', '.join(x[1]) if x[1] else '') for i, x in enumerate(line[1:], 1)))) diff --git a/scripts/stack.py b/scripts/stack.py index b9d65ed1..3bd11c74 100755 --- a/scripts/stack.py +++ b/scripts/stack.py @@ -621,11 +621,12 @@ def table(Result, results, diff_results=None, *, # find the best widths, note that column 0 contains the names and is # handled a bit differently widths = co.defaultdict(lambda: 7, {0: 7}) - notes = co.defaultdict(lambda: 0) + nwidths = co.defaultdict(lambda: 0) for line in lines: for i, x in enumerate(line): widths[i] = max(widths[i], ((len(x[0])+1+4-1)//4)*4-1) - notes[i] = max(notes[i], 1+2*len(x[1])+sum(len(n) for n in x[1])) + if i != len(line)-1: + nwidths[i] = max(nwidths[i], 1+sum(2+len(n) for n in x[1])) # print our table for line in lines: @@ -633,7 +634,7 @@ def table(Result, results, diff_results=None, *, widths[0], line[0][0], ' '.join('%*s%-*s' % ( widths[i], x[0], - notes[i], ' (%s)' % ', '.join(x[1]) if x[1] else '') + nwidths[i], ' (%s)' % ', '.join(x[1]) if x[1] else '') for i, x in enumerate(line[1:], 1)))) diff --git a/scripts/structs.py b/scripts/structs.py index b0e68f50..f1b6266e 100755 --- a/scripts/structs.py +++ b/scripts/structs.py @@ -856,11 +856,12 @@ def table(Result, results, diff_results=None, *, # find the best widths, note that column 0 contains the names and is # handled a bit differently widths = co.defaultdict(lambda: 7, {0: 7}) - notes = co.defaultdict(lambda: 0) + nwidths = co.defaultdict(lambda: 0) for line in lines: for i, x in enumerate(line): widths[i] = max(widths[i], ((len(x[0])+1+4-1)//4)*4-1) - notes[i] = max(notes[i], 1+2*len(x[1])+sum(len(n) for n in x[1])) + if i != len(line)-1: + nwidths[i] = max(nwidths[i], 1+sum(2+len(n) for n in x[1])) # print our table for line in lines: @@ -868,7 +869,7 @@ def table(Result, results, diff_results=None, *, widths[0], line[0][0], ' '.join('%*s%-*s' % ( widths[i], x[0], - notes[i], ' (%s)' % ', '.join(x[1]) if x[1] else '') + nwidths[i], ' (%s)' % ', '.join(x[1]) if x[1] else '') for i, x in enumerate(line[1:], 1))))