diff --git a/formatscaper/core/utils.py b/formatscaper/core/utils.py
index e8d60f374408a4e617b8f39bda6006ecaea46a92..7ff9c8dfb55ac9867a079589c3284a8aa5abe103 100644
--- a/formatscaper/core/utils.py
+++ b/formatscaper/core/utils.py
@@ -40,10 +40,13 @@ def load_formats(file_name: str) -> Dict[str, Format]:
     return formats
 
 
-def store_formats(formats: Dict[str, Format], file_name: str) -> bool:
+def store_formats(formats: Dict[str, Format] | List[Format], file_name: str) -> bool:
     """Store the known formats to the given YAML file."""
     try:
-        updated_formats = [f.as_dict() for f in formats.values()]
+        if isinstance(formats, dict):
+            formats = formats.values()
+
+        updated_formats = [f.as_dict() for f in formats]
         with open(file_name, "w") as formats_file:
             yaml.dump(updated_formats, formats_file, sort_keys=False)