Improve code quality

This commit is contained in:
Matthias
2020-09-27 19:40:55 +02:00
parent 5769b9244f
commit 6e70ae6e95
2 changed files with 2 additions and 2 deletions

View File

@@ -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)