From d0e1b6869e05f3ec3c0ffe2f328599f0e866b248 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 06:50:32 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/mercury_engine_data_structures/dread_data.py | 2 +- src/mercury_engine_data_structures/samus_returns_data.py | 4 ++-- tests/formats/test_bctex.py | 1 - tests/formats/test_bmsbk.py | 1 - tests/formats/test_bmsld.py | 1 - tests/formats/test_bmsnav.py | 1 - tests/formats/test_bmssd.py | 1 - tests/formats/test_pkg.py | 1 - tests/test_lib.py | 5 ++--- 9 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/mercury_engine_data_structures/dread_data.py b/src/mercury_engine_data_structures/dread_data.py index 85c8a51c..55cb20fb 100644 --- a/src/mercury_engine_data_structures/dread_data.py +++ b/src/mercury_engine_data_structures/dread_data.py @@ -65,6 +65,6 @@ def all_files_ending_with(ext: str, exclusions: Optional[list[str]] = None) -> l if exclusions is None: exclusions = [] - + return [name for name in all_name_to_asset_id().keys() if name.endswith(ext) and name not in exclusions] diff --git a/src/mercury_engine_data_structures/samus_returns_data.py b/src/mercury_engine_data_structures/samus_returns_data.py index cd169067..33a4eac3 100644 --- a/src/mercury_engine_data_structures/samus_returns_data.py +++ b/src/mercury_engine_data_structures/samus_returns_data.py @@ -66,6 +66,6 @@ def all_files_ending_with(ext: str, exclusions: Optional[list[str]] = None) -> l if exclusions is None: exclusions = [] - + return [name for name in all_name_to_asset_id().keys() - if name.endswith(ext) and name not in exclusions] \ No newline at end of file + if name.endswith(ext) and name not in exclusions] diff --git a/tests/formats/test_bctex.py b/tests/formats/test_bctex.py index caf5b761..fa0c82e2 100644 --- a/tests/formats/test_bctex.py +++ b/tests/formats/test_bctex.py @@ -4,7 +4,6 @@ from mercury_engine_data_structures import dread_data, samus_returns_data from mercury_engine_data_structures.formats.bctex import Bctex - sr_missing = [ "actors/characters/alpha/models/textures/alphab_a.bctex", "actors/characters/alpha/models/textures/alphab_d.bctex", diff --git a/tests/formats/test_bmsbk.py b/tests/formats/test_bmsbk.py index a5dd9435..bbc5acf5 100644 --- a/tests/formats/test_bmsbk.py +++ b/tests/formats/test_bmsbk.py @@ -4,7 +4,6 @@ from mercury_engine_data_structures import samus_returns_data from mercury_engine_data_structures.formats.bmsbk import Bmsbk - sr_missing = [ "maps/levels/c10_samus/s908_manicminerbotrun/s908_manicminerbotrun.bmsbk", "maps/levels/c10_samus/s910_gym/s910_gym.bmsbk", diff --git a/tests/formats/test_bmsld.py b/tests/formats/test_bmsld.py index 49d0b0a2..d4f3638e 100644 --- a/tests/formats/test_bmsld.py +++ b/tests/formats/test_bmsld.py @@ -4,7 +4,6 @@ from mercury_engine_data_structures import samus_returns_data from mercury_engine_data_structures.formats.bmsld import Bmsld - sr_missing = [ "maps/levels/c10_samus/s901_alpha/s901_alpha.bmsld", "maps/levels/c10_samus/s902_gamma/s902_gamma.bmsld", diff --git a/tests/formats/test_bmsnav.py b/tests/formats/test_bmsnav.py index c11335ae..2039b7ae 100644 --- a/tests/formats/test_bmsnav.py +++ b/tests/formats/test_bmsnav.py @@ -4,7 +4,6 @@ from mercury_engine_data_structures import dread_data, samus_returns_data from mercury_engine_data_structures.formats.bmsnav import Bmsnav - sr_missing = [ "maps/levels/c10_samus/s901_alpha/s901_alpha.bmsnav", "maps/levels/c10_samus/s902_gamma/s902_gamma.bmsnav", diff --git a/tests/formats/test_bmssd.py b/tests/formats/test_bmssd.py index 2fc19e04..728456d3 100644 --- a/tests/formats/test_bmssd.py +++ b/tests/formats/test_bmssd.py @@ -4,7 +4,6 @@ from mercury_engine_data_structures import dread_data, samus_returns_data from mercury_engine_data_structures.formats.bmssd import Bmssd - sr_missing = [ "maps/levels/c10_samus/s901_alpha/s901_alpha.bmssd", "maps/levels/c10_samus/s902_gamma/s902_gamma.bmssd", diff --git a/tests/formats/test_pkg.py b/tests/formats/test_pkg.py index cf0d71d3..6bcb0499 100644 --- a/tests/formats/test_pkg.py +++ b/tests/formats/test_pkg.py @@ -6,7 +6,6 @@ from mercury_engine_data_structures.formats.pkg import Pkg from mercury_engine_data_structures.game_check import Game - _EMPTY_DREAD_PKG = (b'\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') wrong_build_sr = [ diff --git a/tests/test_lib.py b/tests/test_lib.py index c48355db..5b25aa17 100644 --- a/tests/test_lib.py +++ b/tests/test_lib.py @@ -3,7 +3,6 @@ import construct import pytest -from construct.lib.containers import Container from mercury_engine_data_structures.file_tree_editor import FileTreeEditor from mercury_engine_data_structures.formats import BaseResource @@ -35,7 +34,7 @@ def _parse_build_compare(module: typing.Type[BaseResource], if print_data: print(data) encoded = construct_class.build(data, target_game=editor.target_game) - + return raw, encoded, data def parse_build_compare_editor(module: typing.Type[BaseResource], @@ -47,7 +46,7 @@ def parse_build_compare_editor(module: typing.Type[BaseResource], def parse_build_compare_editor_parsed(module: typing.Type[BaseResource], editor: FileTreeEditor, file_name: str, print_data=False): _, encoded, data = _parse_build_compare(module, editor, file_name, print_data) - + construct_class = module.construct_class(editor.target_game) data2 = construct_class.parse(encoded, target_game=editor.target_game)