rewrite-to-python: add test for hocon includes, fix generator bug

This commit is contained in:
2025-11-11 19:22:28 +09:00
parent 0a22ae5bfa
commit bf012ea24f
2 changed files with 13 additions and 1 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ def to_hocon(x: Any) -> str:
return f"[\n{'\n'.join(items)}\n]"
elif isinstance(x, dict):
items = [
f' {k}: {indent(to_hocon(v), ' ').removeprefix(' ')}'
f' "{k}": {indent(to_hocon(v), ' ').removeprefix(' ')}'
for k, v in x.items()
]
return f"{{\n{'\n'.join(items)}\n}}"