mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-19 06:11:15 +00:00
Remove pointless parenteses
This commit is contained in:
@@ -376,8 +376,8 @@ class Telegram(RPCHandler):
|
|||||||
exit_wording = f"Partially {exit_wording.lower()}"
|
exit_wording = f"Partially {exit_wording.lower()}"
|
||||||
if msg['cumulative_profit']:
|
if msg['cumulative_profit']:
|
||||||
cp_extra = (
|
cp_extra = (
|
||||||
f"*Cumulative Profit:* `({msg['cumulative_profit']:.8f} "
|
f"*Cumulative Profit:* `{msg['cumulative_profit']:.8f} "
|
||||||
f"{msg['stake_currency']}{cp_fiat})`\n"
|
f"{msg['stake_currency']}{cp_fiat}`\n"
|
||||||
)
|
)
|
||||||
enter_tag = f"*Enter Tag:* `{msg['enter_tag']}`\n" if msg.get('enter_tag') else ""
|
enter_tag = f"*Enter Tag:* `{msg['enter_tag']}`\n" if msg.get('enter_tag') else ""
|
||||||
message = (
|
message = (
|
||||||
@@ -405,7 +405,7 @@ class Telegram(RPCHandler):
|
|||||||
stake_amount_fiat = self.__format_profit_fiat(msg, 'stake_amount')
|
stake_amount_fiat = self.__format_profit_fiat(msg, 'stake_amount')
|
||||||
|
|
||||||
rem = round_coin_value(msg['stake_amount'], msg['stake_currency'])
|
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:
|
else:
|
||||||
message += f"\n*Duration:* `{duration} ({duration_min:.1f} min)`"
|
message += f"\n*Duration:* `{duration} ({duration_min:.1f} min)`"
|
||||||
return message
|
return message
|
||||||
|
|||||||
@@ -2226,7 +2226,7 @@ def test_send_msg_exit_notification(default_conf, mocker) -> None:
|
|||||||
assert msg_mock.call_args[0][0] == (
|
assert msg_mock.call_args[0][0] == (
|
||||||
'\N{WARNING SIGN} *Binance (dry):* Partially exiting KEY/ETH (#1)\n'
|
'\N{WARNING SIGN} *Binance (dry):* Partially exiting KEY/ETH (#1)\n'
|
||||||
'*Unrealized Sub Profit:* `-57.41% (loss: -0.05746268 ETH / -24.812 USD)`\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'
|
'*Enter Tag:* `buy_signal1`\n'
|
||||||
'*Exit Reason:* `stop_loss`\n'
|
'*Exit Reason:* `stop_loss`\n'
|
||||||
'*Direction:* `Long`\n'
|
'*Direction:* `Long`\n'
|
||||||
@@ -2234,7 +2234,7 @@ def test_send_msg_exit_notification(default_conf, mocker) -> None:
|
|||||||
'*Open Rate:* `0.00007500`\n'
|
'*Open Rate:* `0.00007500`\n'
|
||||||
'*Current Rate:* `0.00003201`\n'
|
'*Current Rate:* `0.00003201`\n'
|
||||||
'*Exit 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()
|
msg_mock.reset_mock()
|
||||||
|
|||||||
Reference in New Issue
Block a user