trim_dataframe should enforce kwargs for non-required arguments

This commit is contained in:
Matthias 2023-07-21 20:31:27 +02:00
parent 9bfe96d4d6
commit 4369e3cdeb
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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,