refactor: render setup files from the library

dump_setup moves next to scrape_setup, so readers of the setup format
no longer import the command. base_scraper names its dumper
PlatformDumper, and the command writes through write_if_changed.
This commit is contained in:
Abdessamad Derraz committed 2026-11-21 16:43:46 +01:00
1 parent 12b00e024b
commit b6599375f5
6 files changed
+21 -23

No files matched your search

+2 -2
View File
@@ -1274,10 +1274,10 @@ class PlatformFileHasNoAnchors(unittest.TestCase):
the platform file read back the same, but held &id001 and *id001."""
import yaml
from scraper.base_scraper import _PlatformDumper
from scraper.base_scraper import PlatformDumper
names = ["kick34005.A500", "amiga-os-130.rom"]
text = yaml.dump([{"names": names}, {"names": names}], Dumper=_PlatformDumper)
text = yaml.dump([{"names": names}, {"names": names}], Dumper=PlatformDumper)
self.assertNotIn("&id", text)
self.assertNotIn("*id", text)
self.assertEqual(yaml.safe_load(text), [{"names": names}, {"names": names}])