fix last typechecks

This commit is contained in:
xmatthias 2018-06-02 13:59:35 +02:00
parent 32300f6d5f
commit 0a595190a3
3 changed files with 5 additions and 4 deletions

View File

@ -211,7 +211,8 @@ class Arguments(object):
self.hyperopt_options(hyperopt_cmd) self.hyperopt_options(hyperopt_cmd)
@staticmethod @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 Parse the value of the argument --timerange to determine what is the range desired
:param text: value from --timerange :param text: value from --timerange

View File

@ -219,7 +219,7 @@ class Backtesting(object):
logger.info('Using local backtesting data (using whitelist in given config) ...') logger.info('Using local backtesting data (using whitelist in given config) ...')
timerange = Arguments.parse_timerange(str(self.config.get('timerange'))) timerange = Arguments.parse_timerange(str(self.config.get('timerange')))
data = optimize.load_data( data = optimize.load_data( # type: ignore
self.config['datadir'], self.config['datadir'],
pairs=pairs, pairs=pairs,
ticker_interval=self.ticker_interval, ticker_interval=self.ticker_interval,

View File

@ -494,9 +494,9 @@ class Hyperopt(Backtesting):
) )
def start(self) -> None: 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'))) 'timerange') is None else str(self.config.get('timerange')))
data = load_data( data = load_data( # type: ignore
datadir=str(self.config.get('datadir')), datadir=str(self.config.get('datadir')),
pairs=self.config['exchange']['pair_whitelist'], pairs=self.config['exchange']['pair_whitelist'],
ticker_interval=self.ticker_interval, ticker_interval=self.ticker_interval,