Skip to content

Commit 1feb11b

Browse files
committed
refactor: use fstring for telegram sending
1 parent 93936c9 commit 1feb11b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

freqtrade/rpc/telegram.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ def _prepare_order_details(self, filled_orders: list, quote_currency: str, is_op
670670
# TODO: This calculation ignores fees.
671671
price_to_1st_entry = (cur_entry_average - first_avg) / first_avg
672672
if is_open:
673-
lines.append("({})".format(dt_humanize_delta(order["order_filled_date"])))
673+
lines.append(f"({dt_humanize_delta(order['order_filled_date'])})")
674674
lines.append(
675675
f"*Amount:* {round_value(cur_entry_amount, 8)} "
676676
f"({fmt_coin(order['cost'], quote_currency)})"
@@ -818,7 +818,10 @@ async def _status_msg(self, update: Update, context: CallbackContext) -> None:
818818
[
819819
f"*Realized Profit:* `{r['realized_profit_ratio']:.2%} "
820820
f"({r['realized_profit_r']})`",
821-
f"*Total Profit:* `{r['total_profit_ratio']:.2%} ({r['total_profit_abs_r']})`",
821+
(
822+
f"*Total Profit:* `{r['total_profit_ratio']:.2%} "
823+
f"({r['total_profit_abs_r']})`",
824+
),
822825
]
823826
)
824827

0 commit comments

Comments
 (0)