diff --git a/freqtrade/configuration.py b/freqtrade/configuration.py index c90eddeb8..582b2889c 100644 --- a/freqtrade/configuration.py +++ b/freqtrade/configuration.py @@ -62,8 +62,8 @@ class Configuration(object): conf = json.load(file) except FileNotFoundError: raise OperationalException( - 'Config file "{}" not found!' - ' Please create a config file or check whether it exists.'.format(path)) + f'Config file "{path}" not found!' + ' Please create a config file or check whether it exists.') if 'internals' not in conf: conf['internals'] = {} @@ -109,7 +109,7 @@ class Configuration(object): config['db_url'] = constants.DEFAULT_DB_PROD_URL logger.info('Dry run is disabled') - logger.info('Using DB: "{}"'.format(config['db_url'])) + logger.info(f'Using DB: "{config["db_url"]}"') # Check if the exchange set by the user is supported self.check_exchange(config) diff --git a/freqtrade/optimize/__init__.py b/freqtrade/optimize/__init__.py index 1e76808e7..e806ff2b8 100644 --- a/freqtrade/optimize/__init__.py +++ b/freqtrade/optimize/__init__.py @@ -54,11 +54,8 @@ def load_tickerdata_file( :return dict OR empty if unsuccesful """ path = make_testdata_path(datadir) - pair_file_string = pair.replace('/', '_') - file = os.path.join(path, '{pair}-{ticker_interval}.json'.format( - pair=pair_file_string, - ticker_interval=ticker_interval, - )) + pair_s = pair.replace('/', '_') + file = os.path.join(path, f'{pair_s}-{ticker_interval}.json') gzipfile = file + '.gz' # If the file does not exist we download it when None is returned.