chore: fix RUF043 violations

This commit is contained in:
Matthias
2025-09-15 19:20:20 +02:00
parent 95a710d4a8
commit 9f436dcd1e
15 changed files with 51 additions and 46 deletions

View File

@@ -393,7 +393,7 @@ def test_rpc_delete_trade(mocker, default_conf, fee, markets, caplog, is_short):
freqtradebot.strategy.order_types["stoploss_on_exchange"] = True
create_mock_trades(fee, is_short)
rpc = RPC(freqtradebot)
with pytest.raises(RPCException, match="Trade with id '200' not found."):
with pytest.raises(RPCException, match=r"Trade with id '200' not found\."):
rpc._rpc_delete("200")
trades = Trade.session.scalars(select(Trade)).all()
@@ -1204,7 +1204,7 @@ def test_rpc_force_entry(mocker, default_conf, ticker, fee, limit_buy_order_open
patch_get_signal(freqtradebot)
rpc = RPC(freqtradebot)
pair = "ETH/BTC"
with pytest.raises(RPCException, match="Maximum number of trades is reached."):
with pytest.raises(RPCException, match=r"Maximum number of trades is reached\."):
rpc._rpc_force_entry(pair, None)
freqtradebot.config["max_open_trades"] = 5
@@ -1286,7 +1286,7 @@ def test_rpc_force_entry_wrong_mode(mocker, default_conf) -> None:
patch_get_signal(freqtradebot)
rpc = RPC(freqtradebot)
pair = "ETH/BTC"
with pytest.raises(RPCException, match="Can't go short on Spot markets."):
with pytest.raises(RPCException, match=r"Can't go short on Spot markets\."):
rpc._rpc_force_entry(pair, None, order_side=SignalDirection.SHORT)