From 79aab4cce2f516df4d9504d99c31f3ccf4b70394 Mon Sep 17 00:00:00 2001 From: Janne Sinivirta Date: Tue, 3 Jul 2018 11:17:41 +0300 Subject: [PATCH] use fstring --- freqtrade/optimize/hyperopt.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/freqtrade/optimize/hyperopt.py b/freqtrade/optimize/hyperopt.py index e499def70..9b26b5b09 100644 --- a/freqtrade/optimize/hyperopt.py +++ b/freqtrade/optimize/hyperopt.py @@ -71,10 +71,8 @@ class Hyperopt(Backtesting): # Ensure the number of dimensions match # the number of parameters in the list x. if len(params) != len(dimensions): - msg = "Mismatch in number of search-space dimensions. " \ - "len(dimensions)=={} and len(x)=={}" - msg = msg.format(len(dimensions), len(params)) - raise ValueError(msg) + raise ValueError('Mismatch in number of search-space dimensions. ' + f'len(dimensions)=={len(dimensions)} and len(x)=={len(params)}') # Create a dict where the keys are the names of the dimensions # and the values are taken from the list of parameters x.