get rid of typing.cast()

This commit is contained in:
hroff-1902 2020-02-03 23:08:35 +03:00 committed by GitHub
parent df249c7c03
commit ffb53a6df5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,6 @@
import logging
import sys
from typing import Any, Dict, List, cast
from typing import Any, Dict, List
import arrow
@ -43,18 +43,18 @@ def start_download_data(args: Dict[str, Any]) -> None:
if config.get('download_trades'):
pairs_not_available = refresh_backtest_trades_data(
exchange, pairs=config["pairs"], datadir=config['datadir'],
timerange=timerange, erase=cast(bool, config.get("erase")))
timerange=timerange, erase=bool(config.get("erase")))
# Convert downloaded trade data to different timeframes
convert_trades_to_ohlcv(
pairs=config["pairs"], timeframes=config["timeframes"],
datadir=config['datadir'], timerange=timerange,
erase=cast(bool, config.get("erase")))
erase=bool(config.get("erase")))
else:
pairs_not_available = refresh_backtest_ohlcv_data(
exchange, pairs=config["pairs"], timeframes=config["timeframes"],
datadir=config['datadir'], timerange=timerange,
erase=cast(bool, config.get("erase")))
erase=bool(config.get("erase")))
except KeyboardInterrupt:
sys.exit("SIGINT received, aborting ...")