Skip to content

Apply GitHub style to exporter matrix #8993

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 10, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions tools/export/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"""

def mcu_ide_list():
"""Shows list of exportable ides
"""Shows list of exportable ides

"""
supported_ides = sorted(EXPORTERS.keys())
Expand All @@ -84,10 +84,10 @@ def mcu_ide_matrix(verbose_html=False):
"""
supported_ides = sorted(EXPORTERS.keys())
# Only use it in this function so building works without extra modules
from prettytable import PrettyTable, ALL
from prettytable import PrettyTable, HEADER

# All tests status table print
table_printer = PrettyTable(["Platform"] + supported_ides)
table_printer = PrettyTable(["Platform"] + supported_ides, junction_char="|", hrules=HEADER)
# Align table
for col in supported_ides:
table_printer.align[col] = "c"
Expand All @@ -107,15 +107,12 @@ def mcu_ide_matrix(verbose_html=False):
row.append(text)
table_printer.add_row(row)

table_printer.border = True
table_printer.vrules = ALL
table_printer.hrules = ALL
# creates a html page in a shorter format suitable for readme.md
if verbose_html:
result = table_printer.get_html_string()
else:
result = table_printer.get_string()
result += "\n"
result += "\n\n"
result += "Total IDEs: %d\n"% (len(supported_ides))
if verbose_html:
result += "<br>"
Expand Down