use parentheses for multiline string instead of backslash

This commit is contained in:
Janne Sinivirta 2017-11-18 09:44:28 +02:00
parent aced5cc3ba
commit 4e54b27398

View File

@ -23,13 +23,13 @@ logger = logging.getLogger(__name__)
def format_results(results: DataFrame): def format_results(results: DataFrame):
return 'Made {} buys. Average profit {:.2f}%. ' \ return ('Made {} buys. Average profit {:.2f}%. '
'Total profit was {:.3f}. Average duration {:.1f} mins.'.format( 'Total profit was {:.3f}. Average duration {:.1f} mins.').format(
len(results.index), len(results.index),
results.profit.mean() * 100.0, results.profit.mean() * 100.0,
results.profit.sum(), results.profit.sum(),
results.duration.mean() * 5, results.duration.mean() * 5,
) )
def preprocess(backdata) -> Dict[str, DataFrame]: def preprocess(backdata) -> Dict[str, DataFrame]: