chore: Fix fstring incompatibility with older python versions

This commit is contained in:
Matthias 2024-07-08 18:20:39 +02:00
parent b208f978db
commit 64d22bbd89

View File

@ -101,7 +101,7 @@ class HyperoptOutput:
# "Avg duration": # "Avg duration":
str(r["results_metrics"]["holding_avg"]), str(r["results_metrics"]["holding_avg"]),
# "Objective": # "Objective":
f"{r["loss"]:,.5f}" if r["loss"] != 100000 else "N/A", f"{r['loss']:,.5f}" if r["loss"] != 100000 else "N/A",
# "Max Drawdown (Acct)": # "Max Drawdown (Acct)":
"{} {}".format( "{} {}".format(
fmt_coin( fmt_coin(
@ -109,7 +109,7 @@ class HyperoptOutput:
stake_currency, stake_currency,
keep_trailing_zeros=True, keep_trailing_zeros=True,
), ),
(f"({r["results_metrics"]['max_drawdown_account']:,.2%})").rjust(10, " "), (f"({r['results_metrics']['max_drawdown_account']:,.2%})").rjust(10, " "),
) )
if r["results_metrics"]["max_drawdown_account"] != 0.0 if r["results_metrics"]["max_drawdown_account"] != 0.0
else "--", else "--",