From 6e70ae6e95758e0b5de881d956a81fbb88b0b0be Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 27 Sep 2020 19:40:55 +0200 Subject: [PATCH] Improve code quality --- freqtrade/commands/hyperopt_commands.py | 1 - freqtrade/data/btanalysis.py | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/freqtrade/commands/hyperopt_commands.py b/freqtrade/commands/hyperopt_commands.py index 9075d19d2..fb567321d 100755 --- a/freqtrade/commands/hyperopt_commands.py +++ b/freqtrade/commands/hyperopt_commands.py @@ -86,7 +86,6 @@ def start_hyperopt_show(args: Dict[str, Any]) -> None: config['user_data_dir'] / 'hyperopt_results', config.get('hyperoptexportfilename')) - n = config.get('hyperopt_show_index', -1) filteroptions = { diff --git a/freqtrade/data/btanalysis.py b/freqtrade/data/btanalysis.py index d4edd41a8..b309a7634 100644 --- a/freqtrade/data/btanalysis.py +++ b/freqtrade/data/btanalysis.py @@ -91,7 +91,8 @@ def get_latest_hyperopt_file(directory: Union[Path, str], predef_filename: str = * `directory/.last_result.json` does not exist * `directory/.last_result.json` has the wrong content """ - + if isinstance(directory, str): + directory = Path(directory) if predef_filename: return directory / predef_filename return directory / get_latest_hyperopt_filename(directory)