From fe216e7f159f8e0fa923d3796760a6f7f35da53e Mon Sep 17 00:00:00 2001 From: JSKenyon Date: Thu, 20 Feb 2025 16:34:34 +0200 Subject: [PATCH] Change over from deprecated yaml roundtripdump. (#360) --- quartical/config/parser.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/quartical/config/parser.py b/quartical/config/parser.py index d12e9672..808ed77b 100644 --- a/quartical/config/parser.py +++ b/quartical/config/parser.py @@ -2,7 +2,7 @@ import sys import os from loguru import logger -from ruamel.yaml import round_trip_dump +from ruamel.yaml import YAML from omegaconf import OmegaConf as oc from quartical.config.external import finalize_structure from quartical.config.internal import additional_validation @@ -26,13 +26,9 @@ def create_user_config(): config = oc.merge(config, *additional_config) with open(config_file_path, 'w') as outfile: - round_trip_dump( - oc.to_container(config), - outfile, - default_flow_style=False, - width=60, - indent=2 - ) + yaml = YAML() + + yaml.dump(oc.to_container(config), outfile) logger.success( f"{config_file_path} successfully generated. Go forth and calibrate!"