mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-24 02:27:52 -06:00
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:
1 parent
12b00e024b
commit
b6599375f5
6 files changed
+21
-23
No files matched your search
@@ -15,8 +15,7 @@ from pathlib import Path
|
||||
|
||||
from model.romfolders import source_refs, split_refs
|
||||
from model.safeparse import yaml_load
|
||||
from scraper.romfolders import SourceError, load_sources, scrape_setup
|
||||
from scraper.romfolders.__main__ import dump_setup
|
||||
from scraper.romfolders import SourceError, dump_setup, load_sources, scrape_setup
|
||||
from scraper.romfolders.card import (
|
||||
libretro_core,
|
||||
parse_allium,
|
||||
|
||||
@@ -19,11 +19,11 @@ from model.romfolders import setup_paths, source_refs, split_refs
|
||||
from scraper.romfolders import (
|
||||
Fetcher,
|
||||
SourceError,
|
||||
dump_setup,
|
||||
load_formats,
|
||||
load_sources,
|
||||
scrape_setup,
|
||||
)
|
||||
from scraper.romfolders.__main__ import dump_setup
|
||||
from scraper.retropie_modules import module_enabled
|
||||
|
||||
ROOT = Path(__file__).resolve().parent.parent
|
||||
|
||||
@@ -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}])
|
||||
|
||||
Reference in new issue
Block a user