chore: minor formatting

This commit is contained in:
Matthias
2025-05-08 07:07:22 +02:00
parent 47e1d209db
commit f94fd7d5fc

View File

@@ -61,11 +61,7 @@ class HyperoptTools:
return None return None
@staticmethod @staticmethod
def export_params( def export_params(params, strategy_name: str, filename: Path):
params,
strategy_name: str,
filename: Path,
):
""" """
Generate files Generate files
""" """
@@ -77,7 +73,6 @@ class HyperoptTools:
"ft_stratparam_v": 1, "ft_stratparam_v": 1,
"export_time": datetime.now(timezone.utc), "export_time": datetime.now(timezone.utc),
} }
logger.info(f"Dumping parameters to {filename}") logger.info(f"Dumping parameters to {filename}")
with filename.open("w") as f: with filename.open("w") as f:
rapidjson.dump( rapidjson.dump(
@@ -98,11 +93,7 @@ class HyperoptTools:
return params return params
@staticmethod @staticmethod
def try_export_params( def try_export_params(config: Config, strategy_name: str, params: dict):
config: Config,
strategy_name: str,
params: dict,
):
if params.get(FTHYPT_FILEVERSION, 1) >= 2 and not config.get("disableparamexport", False): if params.get(FTHYPT_FILEVERSION, 1) >= 2 and not config.get("disableparamexport", False):
# Export parameters ... # Export parameters ...
fn = HyperoptTools.get_strategy_filename(config, strategy_name) fn = HyperoptTools.get_strategy_filename(config, strategy_name)