From 1feb11bac0326a6e43f2c17b39dceddf848890eb Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 22 Nov 2025 13:30:52 +0100 Subject: [PATCH] refactor: use fstring for telegram sending --- freqtrade/rpc/telegram.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/freqtrade/rpc/telegram.py b/freqtrade/rpc/telegram.py index fc13b919d..f67c3b53b 100644 --- a/freqtrade/rpc/telegram.py +++ b/freqtrade/rpc/telegram.py @@ -670,7 +670,7 @@ class Telegram(RPCHandler): # TODO: This calculation ignores fees. price_to_1st_entry = (cur_entry_average - first_avg) / first_avg if is_open: - lines.append("({})".format(dt_humanize_delta(order["order_filled_date"]))) + lines.append(f"({dt_humanize_delta(order['order_filled_date'])})") lines.append( f"*Amount:* {round_value(cur_entry_amount, 8)} " f"({fmt_coin(order['cost'], quote_currency)})" @@ -818,7 +818,10 @@ class Telegram(RPCHandler): [ f"*Realized Profit:* `{r['realized_profit_ratio']:.2%} " f"({r['realized_profit_r']})`", - f"*Total Profit:* `{r['total_profit_ratio']:.2%} ({r['total_profit_abs_r']})`", + ( + f"*Total Profit:* `{r['total_profit_ratio']:.2%} " + f"({r['total_profit_abs_r']})`", + ), ] )