No need to use .get() for properties with default values

This commit is contained in:
Matthias
2023-07-12 18:27:46 +02:00
parent 5399253786
commit b593205ad9
7 changed files with 12 additions and 11 deletions

View File

@@ -239,7 +239,7 @@ class Backtesting:
timerange=self.timerange,
startup_candles=self.config['startup_candle_count'],
fail_without_data=True,
data_format=self.config.get('dataformat_ohlcv', 'feather'),
data_format=self.config['dataformat_ohlcv'],
candle_type=self.config.get('candle_type_def', CandleType.SPOT)
)
@@ -268,7 +268,7 @@ class Backtesting:
timerange=self.timerange,
startup_candles=0,
fail_without_data=True,
data_format=self.config.get('dataformat_ohlcv', 'feather'),
data_format=self.config['dataformat_ohlcv'],
candle_type=self.config.get('candle_type_def', CandleType.SPOT)
)
else:
@@ -282,7 +282,7 @@ class Backtesting:
timerange=self.timerange,
startup_candles=0,
fail_without_data=True,
data_format=self.config.get('dataformat_ohlcv', 'feather'),
data_format=self.config['dataformat_ohlcv'],
candle_type=CandleType.FUNDING_RATE
)
@@ -294,7 +294,7 @@ class Backtesting:
timerange=self.timerange,
startup_candles=0,
fail_without_data=True,
data_format=self.config.get('dataformat_ohlcv', 'feather'),
data_format=self.config['dataformat_ohlcv'],
candle_type=CandleType.from_string(self.exchange.get_option("mark_ohlcv_price"))
)
# Combine data to avoid combining the data per trade.