1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2024-10-05 18:31:12 +01:00

Minor fix to rst table generation.

Updated format_simple_table to take headers into account when
calculating column widths. Also updated docs where it currently used.
This commit is contained in:
Sergei Trofimov 2015-03-18 10:47:07 +00:00
parent 3e0c8aa83b
commit aa74e1e8f5
2 changed files with 10 additions and 8 deletions

View File

@ -61,13 +61,13 @@ Instrument method realive to other callbacks registered for the signal (within t
level, callbacks are invoked in the order they were registered). The table below shows the mapping
of the prifix to the corresponding priority:
=========== ===
=========== ========
prefix priority
=========== ===
very_fast\_ 20
fast\_ 10
normal\_ 0
slow\_ -10
very_slow\_ -20
=========== ===
=========== ========
very_fast\_ 20
fast\_ 10
normal\_ 0
slow\_ -10
very_slow\_ -20
=========== ========

View File

@ -174,6 +174,8 @@ def format_simple_table(rows, headers=None, align='>', show_borders=True, border
cols = zip(*rows)
col_widths = [max(map(len, c)) for c in cols]
if headers:
col_widths = [max(len(h), cw) for h, cw in zip(headers, col_widths)]
row_format = ' '.join(['{:%s%s}' % (align[i], w) for i, w in enumerate(col_widths)])
row_format += '\n'