Skip to content

Commit

Permalink
Add type ignore comment for construct
Browse files Browse the repository at this point in the history
  • Loading branch information
ThanatosGit committed Oct 21, 2024
1 parent 6e13033 commit 30c2d86
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/open_samus_returns_rando/romfs/lzss.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Lzss structure was taken from GodMode9 https://github.com/d0k3/GodMode9/commit/a6a15eb70d66e3c96bbc164598f9482bb545b3f9

from construct import Struct
from construct.core import Int32ul
from construct import Struct # type: ignore
from construct.core import Int32ul # type: ignore

LzssFooter = Struct(
"off_size_comp" / Int32ul, # 0xOOSSSSSS, where O == reverse offset and S == size
Expand Down
2 changes: 1 addition & 1 deletion src/open_samus_returns_rando/romfs/packaged_romfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from contextlib import contextmanager
from pathlib import Path

import construct
import construct # type: ignore
from mercury_engine_data_structures.romfs import RomFs

from open_samus_returns_rando.romfs.rom3ds import Rom3DS
Expand Down
6 changes: 3 additions & 3 deletions src/open_samus_returns_rando/romfs/rom3ds.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from io import BufferedReader
from pathlib import Path

import construct
import construct # type: ignore
from construct.core import (
AlignedStruct,
Array,
Expand All @@ -20,7 +20,7 @@
Seek,
Struct,
Tell,
)
) # type: ignore

from open_samus_returns_rando.romfs.lzss import lzss_decompress

Expand Down Expand Up @@ -126,7 +126,7 @@
# is a NCSD or NCCH. (0x0 - 0x100 are the signature)
"ncsd" / NCSD,
# there is a lot of card data, test data etc. totally irrelevant see https://www.3dbrew.org/wiki/NCSD
"_garbage" / Seek(construct.this.ncsd.partitions[0].offset * 0x200), # type: ignore (no idea why it wants a string)
"_garbage" / Seek(construct.this.ncsd.partitions[0].offset * 0x200), # type: ignore
"rom_struct" / ROMStructure,
)

Expand Down

0 comments on commit 30c2d86

Please sign in to comment.