From c58f3e624e6aced9a8793532fd5b93f7b1fd44a3 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Sat, 21 Nov 2026 14:15:54 +0100 Subject: [PATCH] chore: type the games test fixtures for mypy --- tests/test_game_regions.py | 3 +++ tests/test_games_index.py | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/test_game_regions.py b/tests/test_game_regions.py index eb79c8973..2326468e4 100644 --- a/tests/test_game_regions.py +++ b/tests/test_game_regions.py @@ -170,6 +170,9 @@ class FixtureSchemas(unittest.TestCase): class RepositoryRules(unittest.TestCase): """The committed files, against the committed profiles.""" + regions: dict + extras: dict + @classmethod def setUpClass(cls) -> None: cls.regions = load_yaml(REPO_ROOT / REGIONS_FILE) diff --git a/tests/test_games_index.py b/tests/test_games_index.py index 5060679a0..661f05d79 100644 --- a/tests/test_games_index.py +++ b/tests/test_games_index.py @@ -17,8 +17,8 @@ import unittest from pathlib import Path import generate_games_index as gi -from games import fallback -from games import setups as setup_docs +import games.fallback as fallback +import games.setups as setup_docs from games.changes import describe_change from games.coverage import FLOORS, floor_failures from games.folders import arcade_profiles, emulator_profile, resolve_folder @@ -210,7 +210,7 @@ class CheckSaysWhatDiffers(unittest.TestCase): target = out / "index.json" target.write_text(json.dumps({"files": []}), encoding="utf-8") files = {target: json.dumps({"files": [["x.rom", 2, "bios"]]})} - coverage = {"setups": {}, "systems": {}, "arcade": []} + coverage: dict = {"setups": {}, "systems": {}, "arcade": []} stdout, stderr = io.StringIO(), io.StringIO() argv = ["generate_games_index.py", "--check", "--output-dir", tmp] with mock.patch.object(gi, "render", return_value=(files, coverage)), \