Small style fixes

This commit is contained in:
Matthias 2021-05-03 06:30:41 +02:00
parent 6d7096dc66
commit da574e4e69
2 changed files with 3 additions and 3 deletions

View File

@ -362,8 +362,7 @@ class HyperoptTools():
) )
trials['Avg duration'] = trials['Avg duration'].apply( trials['Avg duration'] = trials['Avg duration'].apply(
lambda x: f'{x:,.1f} m' if isinstance( lambda x: f'{x:,.1f} m' if isinstance(
x, float) else f"{x.total_seconds() // 60:,.1f} m" x, float) else f"{x.total_seconds() // 60:,.1f} m" if not isna(x) else ""
if not isna(x) else ""
) )
trials['Objective'] = trials['Objective'].apply( trials['Objective'] = trials['Objective'].apply(
lambda x: f'{x:,.5f}' if x != 100000 else "" lambda x: f'{x:,.5f}' if x != 100000 else ""

View File

@ -918,7 +918,8 @@ def test_start_test_pairlist(mocker, caplog, tickers, default_conf, capsys):
captured.out) captured.out)
def test_hyperopt_list(mocker, capsys, caplog, saved_hyperopt_results, saved_hyperopt_results_legacy): def test_hyperopt_list(mocker, capsys, caplog, saved_hyperopt_results,
saved_hyperopt_results_legacy):
for _ in (saved_hyperopt_results, saved_hyperopt_results_legacy): for _ in (saved_hyperopt_results, saved_hyperopt_results_legacy):
mocker.patch( mocker.patch(
'freqtrade.optimize.hyperopt_tools.HyperoptTools.load_previous_results', 'freqtrade.optimize.hyperopt_tools.HyperoptTools.load_previous_results',