From 4d5b330b777b7b3c6d8fb7ec14fce9519bfb2ff4 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 7 Jul 2024 13:08:52 +0200 Subject: [PATCH] Improve rich generic --- freqtrade/util/rich_tables.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/freqtrade/util/rich_tables.py b/freqtrade/util/rich_tables.py index 66e2d70dc..23fb15d1f 100644 --- a/freqtrade/util/rich_tables.py +++ b/freqtrade/util/rich_tables.py @@ -27,13 +27,15 @@ def print_rich_table( if isinstance(row, dict): table.add_row( *[ - row[header] if isinstance(row[header], (Text, Table)) else str(row[header]) + row[header] if isinstance(row[header], Text) else str(row[header]) for header in headers ] ) else: - table.add_row(*[r if isinstance(r, (Text, Table)) else str(r) for r in row]) + table.add_row( + *[r if isinstance(r, Text) else str(r) for r in row], # type: ignore[arg-type] + ) console = Console( width=200 if "pytest" in sys.modules else None,