chore: fix RUF059 violations

This commit is contained in:
Matthias
2025-09-15 19:15:43 +02:00
parent 5e2f4924d6
commit 95a710d4a8
4 changed files with 5 additions and 5 deletions

View File

@@ -78,5 +78,5 @@ def format_duration(td: timedelta) -> str:
"""
d = td.days
h, r = divmod(td.seconds, 3600)
m, s = divmod(r, 60)
m, _ = divmod(r, 60)
return f"{d}d {h:02d}:{m:02d}"

View File

@@ -357,7 +357,7 @@ def test_get_pair_precision_bt(default_conf, mocker) -> None:
pair = "UNITTEST/BTC"
backtesting.pairlists._whitelist = [pair]
ex_mock = mocker.patch(f"{EXMS}.get_precision_price", return_value=1e-5)
data, timerange = backtesting.load_bt_data()
data, _timerange = backtesting.load_bt_data()
assert data
assert backtesting.get_pair_precision(pair, dt_utc(2018, 1, 1)) == (1e-8, TICK_SIZE)

View File

@@ -534,7 +534,7 @@ def test_api_reloadconf(botclient):
def test_api_pause(botclient):
ftbot, client = botclient
_ftbot, client = botclient
rc = client_post(client, f"{BASE_URI}/pause")
assert_response(rc)
@@ -3281,7 +3281,7 @@ def test_api_download_data(botclient, mocker, tmp_path):
def test_api_markets_live(botclient):
ftbot, client = botclient
_ftbot, client = botclient
rc = client_get(client, f"{BASE_URI}/markets")
assert_response(rc, 200)

View File

@@ -984,7 +984,7 @@ async def test_telegram_profit_long_short_handle(
mocker.patch("freqtrade.rpc.rpc.CryptoToFiatConverter._find_price", return_value=1.1)
mocker.patch.multiple(EXMS, fetch_ticker=ticker_usdt, get_fee=fee)
telegram, freqtradebot, msg_mock = get_telegram_testobject(mocker, default_conf_usdt)
telegram, _freqtradebot, msg_mock = get_telegram_testobject(mocker, default_conf_usdt)
# When there are no trades
await telegram._profit_long(update=update, context=MagicMock())