chore: ruff format updates

This commit is contained in:
Matthias
2025-01-13 18:04:48 +01:00
parent 01ce4e42c6
commit f1c5d4a970
36 changed files with 66 additions and 85 deletions

View File

@@ -120,8 +120,7 @@ def test_ohlcv_fill_up_missing_data(testdatadir, caplog):
assert (data.columns == data2.columns).all()
assert log_has_re(
f"Missing data fillup for UNITTEST/BTC, 1m: before: "
f"{len(data)} - after: {len(data2)}.*",
f"Missing data fillup for UNITTEST/BTC, 1m: before: {len(data)} - after: {len(data2)}.*",
caplog,
)

View File

@@ -556,9 +556,9 @@ def test_analyze_with_orderflow(
assert col in df2.columns, f"Round2: Column {col} not found in df.columns"
if col not in ("stacked_imbalances_bid", "stacked_imbalances_ask"):
assert (
df2[col].count() == 5
), f"Round2: Column {col} has {df2[col].count()} non-NaN values"
assert df2[col].count() == 5, (
f"Round2: Column {col} has {df2[col].count()} non-NaN values"
)
lastval_trade2 = df2.at[len(df2) - 1, "trades"]
assert isinstance(lastval_trade2, list)

View File

@@ -64,7 +64,7 @@ def test_load_data_30min_timeframe(caplog, testdatadir) -> None:
ld = load_pair_history(pair="UNITTEST/BTC", timeframe="30m", datadir=testdatadir)
assert isinstance(ld, DataFrame)
assert not log_has(
'Download history data for pair: "UNITTEST/BTC", timeframe: 30m ' "and store in None.",
'Download history data for pair: "UNITTEST/BTC", timeframe: 30m and store in None.',
caplog,
)
@@ -86,7 +86,7 @@ def test_load_data_1min_timeframe(ohlcv_history, mocker, caplog, testdatadir) ->
load_data(datadir=testdatadir, timeframe="1m", pairs=["UNITTEST/BTC"])
assert file.is_file()
assert not log_has(
'Download history data for pair: "UNITTEST/BTC", interval: 1m ' "and store in None.", caplog
'Download history data for pair: "UNITTEST/BTC", interval: 1m and store in None.', caplog
)
@@ -96,7 +96,7 @@ def test_load_data_mark(ohlcv_history, mocker, caplog, testdatadir) -> None:
load_data(datadir=testdatadir, timeframe="1h", pairs=["UNITTEST/BTC"], candle_type="mark")
assert file.is_file()
assert not log_has(
'Download history data for pair: "UNITTEST/USDT:USDT", interval: 1m ' "and store in None.",
'Download history data for pair: "UNITTEST/USDT:USDT", interval: 1m and store in None.',
caplog,
)