Add base and display snippets, initial generation works

This commit is contained in:
2026-05-15 13:04:18 +02:00
parent 43e510b93d
commit dbda5a8daa
10 changed files with 937 additions and 134 deletions
+20
View File
@@ -0,0 +1,20 @@
from typing import Any, Dict
def deep_merge(a: Dict[str, Any], b: Dict[str, Any]) -> Dict[str, Any]:
"""Recursively merge b into a and return a new dict.
Lists are concatenated; scalar values in b override a.
"""
result = dict(a)
for k, v in b.items():
if k in result:
if isinstance(result[k], dict) and isinstance(v, dict):
result[k] = deep_merge(result[k], v)
elif isinstance(result[k], list) and isinstance(v, list):
result[k] = result[k] + v
else:
result[k] = v
else:
result[k] = v
return result