fix: write a shared list without a YAML anchor

The amiberry and hatarib extractors give a search record and its copy
record one list object, and PyYAML wrote it as &id001 and *id001.
platforms/retrobat.yml, batocera.yml and knulli.yml carried such
anchors. The platform dumper now writes every list out, and the two
files the RetroBat scrape does not rewrite are dumped again through it:
their content is unchanged.
This commit is contained in:
Abdessamad Derraz committed 2026-11-10 02:25:45 +01:00
1 parent 2eca218535
commit 9c46f7471d
5 files changed
+118 -12

No files matched your search

+7
View File
@@ -345,8 +345,15 @@ class _PlatformDumper(yaml.SafeDumper):
Names such as "7800 BIOS (E).rom" or "Bandai - WonderSwan: x" are plain
text, and a bare "01" would be read back as an integer.
Two records sharing one list are written out twice, never as an anchor
and its alias: RetroBat's amiberry search and copy records share their
name list, and the platform file turned into &id001 and *id001.
"""
def ignore_aliases(self, data: object) -> bool:
return True
def _quoted_str(dumper: yaml.SafeDumper, data: str) -> yaml.ScalarNode:
style = None