refactor: annotate every remaining signature

This commit is contained in:
Abdessamad Derraz committed 2026-10-18 00:44:20 +02:00
1 parent 5961b6bfe7
commit faa8af0800
52 files changed
+261 -145

No files matched your search

+1 -1
View File
@@ -15,7 +15,7 @@ from pathlib import Path
class BaseTargetScraper(ABC):
"""Base class for target scrapers."""
def __init__(self, url: str = ""):
def __init__(self, url: str = "") -> None:
self.url = url
@abstractmethod
@@ -292,7 +292,9 @@ def _arch_from_flag(flag: str) -> str:
class Scraper(BaseTargetScraper):
"""Cross-references Batocera boards, Config.in, and es_systems to build target lists."""
def __init__(self, url: str = "https://github.com/batocera-linux/batocera.linux"):
def __init__(
self, url: str = "https://github.com/batocera-linux/batocera.linux"
) -> None:
super().__init__(url=url)
self.tag = ""
@@ -90,7 +90,7 @@ def _script_to_core(filename: str) -> str | None:
class Scraper(BaseTargetScraper):
"""Fetches emulator lists for EmuDeck SteamOS and Windows targets."""
def __init__(self, url: str = "https://github.com/dragoonDorise/EmuDeck"):
def __init__(self, url: str = "https://github.com/dragoonDorise/EmuDeck") -> None:
super().__init__(url=url)
def _fetch_cores_for_target(
@@ -58,7 +58,7 @@ def defconfig_arch(defconfig: str) -> str:
class Scraper(BaseTargetScraper):
"""Per-board core lists from Recalbox's defconfigs and system.ini files."""
def __init__(self, url: str = "https://gitlab.com/recalbox/recalbox"):
def __init__(self, url: str = "https://gitlab.com/recalbox/recalbox") -> None:
super().__init__(url=url)
def fetch_targets(self) -> dict:
@@ -86,7 +86,7 @@ _CORE_NAME_RE = re.compile(r"^(.+?)_libretro")
class Scraper(BaseTargetScraper):
"""Fetches core lists per target from RetroArch buildbot nightly."""
def __init__(self, url: str = BUILDBOT_URL):
def __init__(self, url: str = BUILDBOT_URL) -> None:
super().__init__(url=url)
def _fetch_url(self, url: str) -> str:
@@ -113,7 +113,7 @@ def _parse_module(content: str) -> tuple[str | None, str]:
class Scraper(BaseTargetScraper):
"""Fetches RetroPie package availability by parsing scriptmodules."""
def __init__(self, url: str = GITHUB_API_URL):
def __init__(self, url: str = GITHUB_API_URL) -> None:
super().__init__(url=url)
def _list_scriptmodules(self) -> list[str]:
@@ -127,7 +127,7 @@ def metapackage_cores(package_mk: str, arch: str) -> list[str]:
class Scraper(BaseTargetScraper):
"""Per-device core lists from ROCKNIX's emulators metapackage."""
def __init__(self, url: str = "https://github.com/ROCKNIX/distribution"):
def __init__(self, url: str = "https://github.com/ROCKNIX/distribution") -> None:
super().__init__(url=url)
self.tag = ""