Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 20, 2024
1 parent 2e843a6 commit c1c2846
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 11 deletions.
3 changes: 1 addition & 2 deletions tests/formats/test_bctex.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from mercury_engine_data_structures import dread_data, samus_returns_data
from mercury_engine_data_structures.formats.bctex import Bctex


samus_returns_exclusions = [
"actors/characters/alpha/models/textures/alphab_a.bctex",
"actors/characters/alpha/models/textures/alphab_d.bctex",
Expand Down Expand Up @@ -187,5 +186,5 @@ def test_compare_dread(dread_file_tree, bctex_path):
def test_compare_sr(samus_returns_tree, bctex_path):
if bctex_path in samus_returns_exclusions:
pytest.skip(f"{bctex_path} does not exist!")

parse_build_compare_editor_parsed(Bctex, samus_returns_tree, bctex_path)
1 change: 0 additions & 1 deletion tests/formats/test_bmsbk.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion tests/formats/test_bmsld.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion tests/formats/test_bmsnav.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion tests/formats/test_bmssd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 1 addition & 2 deletions tests/formats/test_pkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -111,7 +110,7 @@ def test_compare_dread(dread_path, pkg_path):
def test_compare_sr(samus_returns_path, pkg_path):
if pkg_path in sr_missing:
pytest.skip(f"{pkg_path} does not exist!")

if pkg_path in wrong_build_sr:
raw = samus_returns_path.joinpath(pkg_path).read_bytes()
target_game = Game.SAMUS_RETURNS
Expand Down
5 changes: 2 additions & 3 deletions tests/test_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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],
Expand All @@ -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)

Expand Down

0 comments on commit c1c2846

Please sign in to comment.