@@ -589,14 +589,14 @@ def values(result):
589
589
def markdown (self ):
590
590
"""Report results of benchmark comparisons in Markdown format."""
591
591
return self ._formatted_text (
592
- ROW = '{0} | {1} | {2} | {3} | {4} \n ' ,
592
+ COLUMN_SEPARATOR = ' | ' ,
593
593
HEADER_SEPARATOR = '---' ,
594
594
DETAIL = self .MARKDOWN_DETAIL )
595
595
596
596
def git (self ):
597
597
"""Report results of benchmark comparisons in 'git' format."""
598
598
return self ._formatted_text (
599
- ROW = '{0} {1} {2} {3} {4} \n ' ,
599
+ COLUMN_SEPARATOR = ' ' ,
600
600
HEADER_SEPARATOR = ' ' ,
601
601
DETAIL = self .GIT_DETAIL )
602
602
@@ -618,22 +618,22 @@ def max_widths(maximum, widths):
618
618
619
619
return reduce (max_widths , widths , [0 ] * 5 )
620
620
621
- def _formatted_text (self , ROW , HEADER_SEPARATOR , DETAIL ):
621
+ def _formatted_text (self , COLUMN_SEPARATOR , HEADER_SEPARATOR , DETAIL ):
622
622
widths = self ._column_widths ()
623
623
self .header_printed = False
624
624
625
625
def justify_columns (contents ):
626
626
return [c .ljust (w ) for w , c in zip (widths , contents )]
627
627
628
628
def row (contents ):
629
- return ROW . format ( * justify_columns (contents ))
629
+ return COLUMN_SEPARATOR . join ( justify_columns (contents )) + ' \n '
630
630
631
631
def header (header ):
632
632
return '\n ' + row (header ) + row ([HEADER_SEPARATOR ] * 5 )
633
633
634
- def format_columns (r , strong ):
635
- return (r if not strong else
636
- r [:- 1 ] + ('**{0}**' . format ( r [- 1 ]) , ))
634
+ def format_columns (r , is_strong ):
635
+ return (r if not is_strong else
636
+ r [:- 1 ] + ('**' + r [- 1 ] + '**' , ))
637
637
638
638
def table (title , results , is_strong = False , is_open = False ):
639
639
rows = [
0 commit comments