mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 02:12:01 +00:00
Improve rich generic
This commit is contained in:
parent
296bf9dc1d
commit
4d5b330b77
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user