Skip to content

Commit

Permalink
don't ignore the linter
Browse files Browse the repository at this point in the history
  • Loading branch information
snake-biscuits committed Aug 28, 2024
1 parent ba957f3 commit 256dc85
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions bsp_tool/archives/respawn/rpak.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import datetime
import enum
import io
import os
from typing import List, Tuple, Union

from ...branches.base import MappedArray
Expand Down Expand Up @@ -331,11 +330,11 @@ class StaRPak:
@classmethod
def from_file(cls, filepath: str) -> StaRPak:
with open(filepath, "rb") as starpak_file:
assert read_struct(starpak_file, "4s") == b"SRPk"
assert read_struct(starpak_file, "I") == 1 # version?
assert binary.read_struct(starpak_file, "4s") == b"SRPk"
assert binary.read_struct(starpak_file, "I") == 1 # version?
out = cls()
starpak_file.seek(-8, 2)
num_entries = read_struct(starpak_file, "Q")
num_entries = binary.read_struct(starpak_file, "Q")
starpak_file.seek(-(8 + num_entries * 16), 2)
out.entries = [StreamEntry.from_stream(starpak_file) for i in range(num_entries)]
return out

0 comments on commit 256dc85

Please sign in to comment.