From 90df6bcd5437898474d68edc131d410ecc5692c5 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 6 Jan 2024 11:48:25 +0100 Subject: [PATCH] Remove pointless parenteses --- freqtrade/rpc/telegram.py | 6 +++--- tests/rpc/test_rpc_telegram.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/freqtrade/rpc/telegram.py b/freqtrade/rpc/telegram.py index 6c0572467..5467bf1d5 100644 --- a/freqtrade/rpc/telegram.py +++ b/freqtrade/rpc/telegram.py @@ -376,8 +376,8 @@ class Telegram(RPCHandler): exit_wording = f"Partially {exit_wording.lower()}" if msg['cumulative_profit']: cp_extra = ( - f"*Cumulative Profit:* `({msg['cumulative_profit']:.8f} " - f"{msg['stake_currency']}{cp_fiat})`\n" + f"*Cumulative Profit:* `{msg['cumulative_profit']:.8f} " + f"{msg['stake_currency']}{cp_fiat}`\n" ) enter_tag = f"*Enter Tag:* `{msg['enter_tag']}`\n" if msg.get('enter_tag') else "" message = ( @@ -405,7 +405,7 @@ class Telegram(RPCHandler): stake_amount_fiat = self.__format_profit_fiat(msg, 'stake_amount') rem = round_coin_value(msg['stake_amount'], msg['stake_currency']) - message += f"\n*Remaining:* `({rem}{stake_amount_fiat})`" + message += f"\n*Remaining:* `{rem}{stake_amount_fiat}`" else: message += f"\n*Duration:* `{duration} ({duration_min:.1f} min)`" return message diff --git a/tests/rpc/test_rpc_telegram.py b/tests/rpc/test_rpc_telegram.py index 8058fa99c..33a47d295 100644 --- a/tests/rpc/test_rpc_telegram.py +++ b/tests/rpc/test_rpc_telegram.py @@ -2226,7 +2226,7 @@ def test_send_msg_exit_notification(default_conf, mocker) -> None: assert msg_mock.call_args[0][0] == ( '\N{WARNING SIGN} *Binance (dry):* Partially exiting KEY/ETH (#1)\n' '*Unrealized Sub Profit:* `-57.41% (loss: -0.05746268 ETH / -24.812 USD)`\n' - '*Cumulative Profit:* `(-0.15746268 ETH / -24.812 USD)`\n' + '*Cumulative Profit:* `-0.15746268 ETH / -24.812 USD`\n' '*Enter Tag:* `buy_signal1`\n' '*Exit Reason:* `stop_loss`\n' '*Direction:* `Long`\n' @@ -2234,7 +2234,7 @@ def test_send_msg_exit_notification(default_conf, mocker) -> None: '*Open Rate:* `0.00007500`\n' '*Current Rate:* `0.00003201`\n' '*Exit Rate:* `0.00003201`\n' - '*Remaining:* `(0.01 ETH / -24.812 USD)`' + '*Remaining:* `0.01 ETH / -24.812 USD`' ) msg_mock.reset_mock()