From 4369e3cdebf143c536253dd8e7d4d19f0cae44fa Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 21 Jul 2023 20:31:27 +0200 Subject: [PATCH] trim_dataframe should enforce kwargs for non-required arguments --- freqtrade/data/converter.py | 2 +- freqtrade/plot/plotting.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/freqtrade/data/converter.py b/freqtrade/data/converter.py index 4b4c89d08..049c399e4 100644 --- a/freqtrade/data/converter.py +++ b/freqtrade/data/converter.py @@ -122,7 +122,7 @@ def ohlcv_fill_up_missing_data(dataframe: DataFrame, timeframe: str, pair: str) return df -def trim_dataframe(df: DataFrame, timerange, df_date_col: str = 'date', +def trim_dataframe(df: DataFrame, timerange, *, df_date_col: str = 'date', startup_candles: int = 0) -> DataFrame: """ Trim dataframe based on given timerange diff --git a/freqtrade/plot/plotting.py b/freqtrade/plot/plotting.py index 7fd20f041..c45a09fbb 100644 --- a/freqtrade/plot/plotting.py +++ b/freqtrade/plot/plotting.py @@ -84,7 +84,7 @@ def init_plotscript(config, markets: List, startup_candles: int = 0): except ValueError as e: raise OperationalException(e) from e if not trades.empty: - trades = trim_dataframe(trades, timerange, 'open_date') + trades = trim_dataframe(trades, timerange, df_date_col='open_date') return {"ohlcv": data, "trades": trades,