fix last typechecks
This commit is contained in:
parent
32300f6d5f
commit
0a595190a3
@ -211,7 +211,8 @@ class Arguments(object):
|
||||
self.hyperopt_options(hyperopt_cmd)
|
||||
|
||||
@staticmethod
|
||||
def parse_timerange(text: str) -> Optional[Tuple[Tuple, Optional[int], Optional[int]]]:
|
||||
def parse_timerange(text: Optional[str]) -> Optional[Tuple[Tuple,
|
||||
Optional[int], Optional[int]]]:
|
||||
"""
|
||||
Parse the value of the argument --timerange to determine what is the range desired
|
||||
:param text: value from --timerange
|
||||
|
@ -219,7 +219,7 @@ class Backtesting(object):
|
||||
logger.info('Using local backtesting data (using whitelist in given config) ...')
|
||||
|
||||
timerange = Arguments.parse_timerange(str(self.config.get('timerange')))
|
||||
data = optimize.load_data(
|
||||
data = optimize.load_data( # type: ignore
|
||||
self.config['datadir'],
|
||||
pairs=pairs,
|
||||
ticker_interval=self.ticker_interval,
|
||||
|
@ -494,9 +494,9 @@ class Hyperopt(Backtesting):
|
||||
)
|
||||
|
||||
def start(self) -> None:
|
||||
timerange = Arguments.parse_timerange(self.config.get('timerange') if self.config.get(
|
||||
timerange = Arguments.parse_timerange(None if self.config.get(
|
||||
'timerange') is None else str(self.config.get('timerange')))
|
||||
data = load_data(
|
||||
data = load_data( # type: ignore
|
||||
datadir=str(self.config.get('datadir')),
|
||||
pairs=self.config['exchange']['pair_whitelist'],
|
||||
ticker_interval=self.ticker_interval,
|
||||
|
Loading…
Reference in New Issue
Block a user