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
+1 -1
View File
@@ -78,5 +78,5 @@ def format_duration(td: timedelta) -> str:
""" """
d = td.days d = td.days
h, r = divmod(td.seconds, 3600) h, r = divmod(td.seconds, 3600)
m, s = divmod(r, 60) m, _ = divmod(r, 60)
return f"{d}d {h:02d}:{m:02d}" return f"{d}d {h:02d}:{m:02d}"
+1 -1
View File
@@ -357,7 +357,7 @@ def test_get_pair_precision_bt(default_conf, mocker) -> None:
pair = "UNITTEST/BTC" pair = "UNITTEST/BTC"
backtesting.pairlists._whitelist = [pair] backtesting.pairlists._whitelist = [pair]
ex_mock = mocker.patch(f"{EXMS}.get_precision_price", return_value=1e-5) 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 data
assert backtesting.get_pair_precision(pair, dt_utc(2018, 1, 1)) == (1e-8, TICK_SIZE) assert backtesting.get_pair_precision(pair, dt_utc(2018, 1, 1)) == (1e-8, TICK_SIZE)
+2 -2
View File
@@ -534,7 +534,7 @@ def test_api_reloadconf(botclient):
def test_api_pause(botclient): def test_api_pause(botclient):
ftbot, client = botclient _ftbot, client = botclient
rc = client_post(client, f"{BASE_URI}/pause") rc = client_post(client, f"{BASE_URI}/pause")
assert_response(rc) assert_response(rc)
@@ -3281,7 +3281,7 @@ def test_api_download_data(botclient, mocker, tmp_path):
def test_api_markets_live(botclient): def test_api_markets_live(botclient):
ftbot, client = botclient _ftbot, client = botclient
rc = client_get(client, f"{BASE_URI}/markets") rc = client_get(client, f"{BASE_URI}/markets")
assert_response(rc, 200) assert_response(rc, 200)
+1 -1
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("freqtrade.rpc.rpc.CryptoToFiatConverter._find_price", return_value=1.1)
mocker.patch.multiple(EXMS, fetch_ticker=ticker_usdt, get_fee=fee) 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 # When there are no trades
await telegram._profit_long(update=update, context=MagicMock()) await telegram._profit_long(update=update, context=MagicMock())