From 0952586ca35b2679fee7c94a20651ab86f79131a Mon Sep 17 00:00:00 2001 From: Ivan Ruiz Manuel <72193617+irm-codebase@users.noreply.github.com> Date: Tue, 19 Nov 2024 15:08:47 +0100 Subject: [PATCH] Fix recursion in to_yaml method --- src/calliope/attrdict.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/calliope/attrdict.py b/src/calliope/attrdict.py index 6c84e51d..3e12e402 100644 --- a/src/calliope/attrdict.py +++ b/src/calliope/attrdict.py @@ -359,7 +359,6 @@ def to_yaml(self, path: str | None = None) -> str: yaml_.dump(result, stream) yaml_str = stream.getvalue() if path: - yaml_str = self.to_yaml() with open(path, "w") as f: f.write(yaml_str) return yaml_str