From d15f17a03fde89f6f6607b0500ba67da9fdc8828 Mon Sep 17 00:00:00 2001 From: Joe Schr <8218910+TheJoeSchr@users.noreply.github.com> Date: Mon, 26 Feb 2024 11:55:59 +0100 Subject: [PATCH] chore: remove unused parameter `pairs` from `populate_dataframe_with_trades` --- freqtrade/data/converter/orderflow.py | 4 +--- freqtrade/strategy/interface.py | 3 +-- tests/data/test_converter_public_trades.py | 5 ++--- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/freqtrade/data/converter/orderflow.py b/freqtrade/data/converter/orderflow.py index f9f9a3c3f..d62c654b0 100644 --- a/freqtrade/data/converter/orderflow.py +++ b/freqtrade/data/converter/orderflow.py @@ -58,9 +58,7 @@ def _calculate_ohlcv_candle_start_and_end(df: DataFrame, timeframe: str): def populate_dataframe_with_trades(config: Config, dataframe: DataFrame, - trades: DataFrame, - *, - pair: str) -> DataFrame: + trades: DataFrame) -> DataFrame: """ Populates a dataframe with trades :param dataframe: Dataframe to populate diff --git a/freqtrade/strategy/interface.py b/freqtrade/strategy/interface.py index f08e97a69..9ce66751f 100644 --- a/freqtrade/strategy/interface.py +++ b/freqtrade/strategy/interface.py @@ -1405,8 +1405,7 @@ class IStrategy(ABC, HyperStrategyMixin): dataframe = populate_dataframe_with_trades( config, dataframe, - trades, - pair=metadata['pair']) + trades) logger.debug("Populated dataframe with trades.") diff --git a/tests/data/test_converter_public_trades.py b/tests/data/test_converter_public_trades.py index b0440ce34..d8e848a79 100644 --- a/tests/data/test_converter_public_trades.py +++ b/tests/data/test_converter_public_trades.py @@ -78,8 +78,7 @@ def test_public_trades_mock_populate_dataframe_with_trades__check_orderflow( 'stacked_imbalance_range': 3 }} # Apply the function to populate the data frame with order flow data - df = populate_dataframe_with_trades(config, - dataframe, trades, pair='unitttest') + df = populate_dataframe_with_trades(config, dataframe, trades) # Extract results from the first row of the DataFrame results = df.iloc[0] t = results['trades'] @@ -183,7 +182,7 @@ def test_public_trades_trades_mock_populate_dataframe_with_trades__check_trades( } # Populate the DataFrame with trades and order flow data - df = populate_dataframe_with_trades(config, dataframe, trades, pair='unitttest') + df = populate_dataframe_with_trades(config, dataframe, trades) # --- DataFrame and Trade Data Validation ---