fixed printed message; cosmetic changes in the code in scripts/download_backtest_data.py

This commit is contained in:
hroff-1902 2019-04-11 00:59:53 +03:00
parent 902ffa6853
commit c2ca899c7e

View File

@ -1,6 +1,7 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
"""
"""This script generate json data""" This script generates json data
"""
import json import json
import sys import sys
from pathlib import Path from pathlib import Path
@ -35,7 +36,7 @@ if args.config:
config: Dict[str, Any] = {} config: Dict[str, Any] = {}
# Now expecting a list of config filenames here, not a string # Now expecting a list of config filenames here, not a string
for path in args.config: for path in args.config:
print('Using config: %s ...', path) print(f"Using config: {path}...")
# Merge config options, overwriting old values # Merge config options, overwriting old values
config = deep_merge_dicts(configuration._load_config_file(path), config) config = deep_merge_dicts(configuration._load_config_file(path), config)
@ -44,18 +45,19 @@ if args.config:
config['exchange']['key'] = '' config['exchange']['key'] = ''
config['exchange']['secret'] = '' config['exchange']['secret'] = ''
else: else:
config = {'stake_currency': '', config = {
'dry_run': True, 'stake_currency': '',
'exchange': { 'dry_run': True,
'name': args.exchange, 'exchange': {
'key': '', 'name': args.exchange,
'secret': '', 'key': '',
'pair_whitelist': [], 'secret': '',
'ccxt_async_config': { 'pair_whitelist': [],
"enableRateLimit": False 'ccxt_async_config': {
} 'enableRateLimit': False
} }
} }
}
dl_path = Path(DEFAULT_DL_PATH).joinpath(config['exchange']['name']) dl_path = Path(DEFAULT_DL_PATH).joinpath(config['exchange']['name'])