mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-23 20:29:06 -05:00
chore: merge round 2 fixes (tests)
# Conflicts: # install.ps1 # install.py # install.sh
This commit is contained in:
commit
ce1f165d2f
35 files changed
+618
-163
No files matched your search
@@ -443,7 +443,6 @@ def _patch_bios_entries(text: str, files: list[dict]) -> str:
|
||||
"""
|
||||
import re
|
||||
|
||||
# Build a lookup of what to patch
|
||||
patches: dict[str, dict] = {}
|
||||
for fe in files:
|
||||
if fe.get("category") != "bios_zip":
|
||||
|
||||
@@ -444,7 +444,6 @@ class Scraper(BaseScraper):
|
||||
"""Generate a platform YAML config dict from scraped data."""
|
||||
requirements = self.fetch_requirements()
|
||||
|
||||
# Parse source to extract display names per system
|
||||
raw = self._fetch_raw()
|
||||
source_dict = self._extract_systems_dict(raw)
|
||||
display_names: dict[str, str] = {}
|
||||
|
||||
@@ -214,7 +214,6 @@ def parse_firmware_database(
|
||||
r"\s*\)"
|
||||
)
|
||||
|
||||
# Collect firmware slots
|
||||
firmware_slots: dict[tuple[str, str], str] = {}
|
||||
for m in firmware_re.finditer(source):
|
||||
system, fw_id, desc = m.group(1), m.group(2), m.group(3)
|
||||
@@ -252,7 +251,6 @@ def parse_firmware_database(
|
||||
slot_key = (system, fw_id)
|
||||
slot_options.setdefault(slot_key, []).append((file_entry, status))
|
||||
|
||||
# Build records from FirmwareAndOption one-liners
|
||||
records: list[dict] = []
|
||||
|
||||
for m in fao_re.finditer(source):
|
||||
|
||||
@@ -372,13 +372,12 @@ def _parse_rom_entries(block: str) -> list[dict]:
|
||||
("rom_load", _ROM_LOAD),
|
||||
]
|
||||
|
||||
# Collect all matches with their positions
|
||||
events: list[tuple[int, str, re.Match]] = []
|
||||
for tag, pat in token_patterns:
|
||||
for m in pat.finditer(block):
|
||||
events.append((m.start(), tag, m))
|
||||
|
||||
# Sort by position in block
|
||||
# Walked in source order: a ROM_LOAD belongs to the last ROM_REGION above it.
|
||||
events.sort(key=lambda e: e[0])
|
||||
|
||||
for _pos, tag, m in events:
|
||||
|
||||
@@ -230,7 +230,6 @@ class Scraper(BaseScraper):
|
||||
"""Generate a platform YAML config dict from scraped data."""
|
||||
requirements = self.fetch_requirements()
|
||||
|
||||
# Parse source to extract display names per system
|
||||
raw = self._fetch_raw()
|
||||
source_data = json.loads(raw)
|
||||
display_names: dict[str, str] = {}
|
||||
|
||||
@@ -380,7 +380,6 @@ class Scraper(BaseScraper):
|
||||
if system is None:
|
||||
continue
|
||||
|
||||
# Resolve path
|
||||
paths_raw = entry.get("paths")
|
||||
if isinstance(paths_raw, str):
|
||||
resolved = _resolve_path(paths_raw)
|
||||
|
||||
Reference in new issue
Block a user