chore: drop label comments across scripts

CommentsSayWhy read three scripts while 22 comments in 13 other files
named the next statement. They are removed or replaced by the reason,
and the test reads every tracked script and install.py.
This commit is contained in:
Abdessamad Derraz committed 2026-10-21 10:06:39 +02:00
1 parent b057684b94
commit d63c881648
16 files changed
+16 -28

No files matched your search

-1
View File
@@ -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":
-1
View File
@@ -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] = {}
-2
View File
@@ -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):
+1 -2
View File
@@ -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:
-1
View File
@@ -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] = {}
-1
View File
@@ -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)