1
Fork 0

refactor(hpc): ruff checks

This commit is contained in:
Tibo De Peuter 2026-04-05 08:05:13 +02:00
parent ef380d073f
commit fb346a06b2
4 changed files with 66 additions and 54 deletions

View file

@ -55,10 +55,11 @@ def from_file(path: str) -> tuple[MorphologyConfig, ArenaConfig, EnvConfig]:
with open(path, "r") as f:
if path.endswith(".yaml") or path.endswith(".yml"):
import yaml
config_dict = yaml.safe_load(f)
else:
config_dict = json.load(f)
morphology = MorphologyConfig(**config_dict.get("morphology", {}))
arena = ArenaConfig(**config_dict.get("arena", {}))
env = EnvConfig(**config_dict.get("env", {}))