mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
chore: fix RUF059 violations
This commit is contained in:
@@ -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}"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user