Skip to content

Commit 49d25bf

Browse files
committed
[benchmark] ReportFomatter: de-tuple
Remove unnecessary list-to-tuple conversions.
1 parent 081e1c9 commit 49d25bf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

benchmark/scripts/compare_perf_tests.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -614,22 +614,22 @@ def _column_widths(self):
614614
]
615615

616616
def max_widths(maximum, widths):
617-
return tuple(map(max, zip(maximum, widths)))
617+
return map(max, zip(maximum, widths))
618618

619-
return reduce(max_widths, widths, tuple([0] * 5))
619+
return reduce(max_widths, widths, [0] * 5)
620620

621621
def _formatted_text(self, ROW, HEADER_SEPARATOR, DETAIL):
622622
widths = self._column_widths()
623623
self.header_printed = False
624624

625625
def justify_columns(contents):
626-
return tuple([c.ljust(w) for w, c in zip(widths, contents)])
626+
return [c.ljust(w) for w, c in zip(widths, contents)]
627627

628628
def row(contents):
629629
return ROW.format(*justify_columns(contents))
630630

631631
def header(header):
632-
return '\n' + row(header) + row(tuple([HEADER_SEPARATOR] * 5))
632+
return '\n' + row(header) + row([HEADER_SEPARATOR] * 5)
633633

634634
def format_columns(r, strong):
635635
return (r if not strong else

0 commit comments

Comments
 (0)