From a6c38ebd8cb60cbf9ce58944fe8b19b24b17a80a Mon Sep 17 00:00:00 2001 From: Yoann Schneider <yschneider@teklia.com> Date: Thu, 11 Apr 2024 15:20:28 +0000 Subject: [PATCH] Align at right, except first column --- nerval/utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nerval/utils.py b/nerval/utils.py index 65aefd7..da6a26e 100644 --- a/nerval/utils.py +++ b/nerval/utils.py @@ -6,6 +6,10 @@ def print_markdown_table(header: list[str], rows: list[list]) -> None: table = PrettyTable() table.field_names = header table.set_style(MARKDOWN) + # Align all columns at right + table.align = "r" + # First column should be left aligned still + table.align[header[0]] = "l" table.add_rows(rows) print(table) -- GitLab