fix: type the code written today for mypy

Every error outside mypy-baseline.txt is fixed in the code:
- common.py: the CRC32 step reused found, the name the layout branch
  gives a resolution tuple, for its list of matches. It now has its own
  name. bindings_of annotates its systems.
- launchers.py, retropie_launchers.py, install.py: an Optional value
  read before its None check.
- recalbox_launchers.py, rocknix_launchers.py: Launcher calls take
  typed keywords, a partial or named parameters, instead of a
  dict[str, object] spread. end_lineno falls back to lineno.
- retrobat_launchers.py: the StageRomKey match no longer reuses the
  str key, and record values are checked before they are iterated.
- batocera_launchers.py: the value of an assignment is read on an
  Assign or AnnAssign only, and the launcher list is annotated.
- emuelec_launchers.py, emuelec_scraper.py, rocknix_scraper.py: import
  fallbacks no importer reaches are dropped, a reused name renamed.
- batocera_targets_scraper.py: a submodule answer without a commit is
  refused.
The baseline loses the 30 entries these fixes resolved and gains
none.
This commit is contained in:
Abdessamad Derraz committed 2026-11-10 04:41:44 +01:00
1 parent b6129310e5
commit 13e60386be
16 files changed
+83 -119

No files matched your search

@@ -559,6 +559,8 @@ class Scraper(BaseTargetScraper):
repos = [("", self.REPO, self.tag)]
for prefix, repo in self.SUBMODULES.items():
pin = _fetch_json(self._api(prefix.rstrip("/")))
if not isinstance(pin, dict) or not isinstance(pin.get("sha"), str):
raise RuntimeError(f"no submodule commit for {prefix} at {self.tag}")
repos.append((prefix, repo, pin["sha"]))
found: dict[str, str] = {}
for prefix, repo, ref in repos: