From 5db7ab0feb262b85ad298651279aa7d6fc2b918f Mon Sep 17 00:00:00 2001 From: Steven Franklin Date: Tue, 16 Jul 2024 15:04:49 -0500 Subject: [PATCH] ruff --- src/mercury_engine_data_structures/formats/bcskla.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mercury_engine_data_structures/formats/bcskla.py b/src/mercury_engine_data_structures/formats/bcskla.py index f145abe0..4a7e43ef 100644 --- a/src/mercury_engine_data_structures/formats/bcskla.py +++ b/src/mercury_engine_data_structures/formats/bcskla.py @@ -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") @@ -198,7 +199,8 @@ def validate(self) -> None: raise ValueError(f"Track {track.bone_name} ({i}) has unexpected TT!") 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}" + f" does not end on keyframe {self.frame_count}!") def __str__(self) -> str: pprint(self)