Skip to content

Commit

Permalink
ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
steven11sjf committed Jul 16, 2024
1 parent ed811ca commit 5db7ab0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/mercury_engine_data_structures/formats/bcskla.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ def _parse(self, stream, context, path) -> KeyFramedValues:
kf_count = Int16ul._parsereport(stream, context, path)

# timings
timings = Array(kf_count, Int8ul if timing_type == 8 else Int16ul)._parsereport(stream, context, f"{path} -> Timings")
format_field = Int8ul if timing_type == 8 else Int16ul
timings = Array(kf_count, format_field)._parsereport(stream, context, f"{path} -> Timings")
AlignTo(4, b"\xff")._parse(stream, context, path)

values = Array(kf_count, CVector2D)._parsereport(stream, context, f"{path} -> Values")
Expand Down Expand Up @@ -198,7 +199,8 @@ def validate(self) -> None:
raise ValueError(f"Track {track.bone_name} ({i}) has unexpected TT!")

Check warning on line 199 in src/mercury_engine_data_structures/formats/bcskla.py

View check run for this annotation

Codecov / codecov/patch

src/mercury_engine_data_structures/formats/bcskla.py#L199

Added line #L199 was not covered by tests

if value.keyframes[-1].time != self.frame_count:
raise ValueError(f"KFV for {track.bone_name}, value {i} does not end on keyframe {self.frame_count}!")
raise ValueError(f"KFV for {track.bone_name}, value {i}"

Check warning on line 202 in src/mercury_engine_data_structures/formats/bcskla.py

View check run for this annotation

Codecov / codecov/patch

src/mercury_engine_data_structures/formats/bcskla.py#L202

Added line #L202 was not covered by tests
f" does not end on keyframe {self.frame_count}!")

def __str__(self) -> str:
pprint(self)
Expand Down

0 comments on commit 5db7ab0

Please sign in to comment.