diff --git a/src/open_samus_returns_rando/__init__.py b/src/open_samus_returns_rando/__init__.py index d05e9c16..12e9841a 100644 --- a/src/open_samus_returns_rando/__init__.py +++ b/src/open_samus_returns_rando/__init__.py @@ -3,9 +3,9 @@ from .patch_util import patch_with_status_update -def patch(input_path: Path, output_path: Path, configuration: dict) -> None: +def patch(input_path: Path, input_exheader: Path, output_path: Path, configuration: dict) -> None: from .samus_returns_patcher import patch_extracted - return patch_extracted(input_path, output_path, configuration) + return patch_extracted(input_path, input_exheader, output_path, configuration) __all__ = [ diff --git a/src/open_samus_returns_rando/lua_editor.py b/src/open_samus_returns_rando/lua_editor.py index 3be4c7de..703dc9a6 100644 --- a/src/open_samus_returns_rando/lua_editor.py +++ b/src/open_samus_returns_rando/lua_editor.py @@ -67,7 +67,7 @@ def _read_level_lua(level_id: str) -> str: "s110_surfaceb": "s00", } -def get_parent_for(item_id) -> str: +def get_parent_for(item_id: str) -> str: return SPECIFIC_CLASSES.get(item_id, "RandomizerPowerup") class ScriptClass: diff --git a/src/open_samus_returns_rando/multiworld_integration.py b/src/open_samus_returns_rando/multiworld_integration.py index 6901c475..f8a10a55 100644 --- a/src/open_samus_returns_rando/multiworld_integration.py +++ b/src/open_samus_returns_rando/multiworld_integration.py @@ -5,7 +5,7 @@ from open_samus_returns_rando.misc_patches.lua_util import lua_convert -def get_lua_for_item(progression: list[list[dict[str, str | int]]]): +def get_lua_for_item(progression: list[list[dict[str, str | int]]]) -> str: generic_pickup = """ Game.ImportLibrary("actors/items/randomizerpowerup/scripts/randomizerpowerup.lc", false) MultiworldPickup = MultiworldPickup or {} @@ -33,13 +33,13 @@ def get_lua_for_item(progression: list[list[dict[str, str | int]]]): ) -def create_exefs_patches(out_code: Path, out_exheader: Path, input_exheader: Path, enabled: bool, region: str): +def create_exefs_patches(out_code: Path, out_exheader: Path, input_exheader: Path, enabled: bool, region: str) -> None: if not enabled: return import shutil - import ips + import ips # type: ignore # Citra and Luma don't support patching the exheader. User needs to provide it as input and # here the patch is just applied diff --git a/src/open_samus_returns_rando/samus_returns_patcher.py b/src/open_samus_returns_rando/samus_returns_patcher.py index 251bc209..6bffc63f 100644 --- a/src/open_samus_returns_rando/samus_returns_patcher.py +++ b/src/open_samus_returns_rando/samus_returns_patcher.py @@ -50,7 +50,7 @@ def add_custom_files(editor: PatcherEditor) -> None: -def validate(configuration: dict, input_exheader: Path | None): +def validate(configuration: dict, input_exheader: Path | None) -> None: # validate patcher json with the schema.json DefaultValidatingDraft7Validator(_read_schema()).validate(configuration) @@ -66,7 +66,7 @@ def validate(configuration: dict, input_exheader: Path | None): -def patch_extracted(input_path: Path, input_exheader: Path, output_path: Path, configuration: dict): +def patch_extracted(input_path: Path, input_exheader: Path, output_path: Path, configuration: dict) -> None: LOG.info("Will patch files from %s", input_path) validate(configuration, input_exheader)