From 740ccbcd31d12deb1fb851d32c0b3adec8080ed8 Mon Sep 17 00:00:00 2001 From: Viv Date: Wed, 26 Jul 2023 10:17:28 -0400 Subject: [PATCH] Fix linting issues --- src/tja2fumen/converters.py | 2 +- src/tja2fumen/parsers.py | 2 +- src/tja2fumen/types.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tja2fumen/converters.py b/src/tja2fumen/converters.py index 46f3472..7445412 100644 --- a/src/tja2fumen/converters.py +++ b/src/tja2fumen/converters.py @@ -225,7 +225,7 @@ def convert_tja_to_fumen(tja): branch_points_measure = 0 for idx_d, data in enumerate(measure_tja.data): # Compute the ms position of the note - pos_ratio = ((data.pos - measure_tja.pos_start) / + pos_ratio = ((data.pos - measure_tja.pos_start) / (measure_tja.pos_end - measure_tja.pos_start)) note_pos = (measure_fumen.duration * pos_ratio) diff --git a/src/tja2fumen/parsers.py b/src/tja2fumen/parsers.py index 87b4ab2..c8458bd 100644 --- a/src/tja2fumen/parsers.py +++ b/src/tja2fumen/parsers.py @@ -31,7 +31,7 @@ def parse_tja(fname_tja): def split_tja_lines_into_courses(lines): """ Parse TJA metadata in order to divide TJA lines into separate courses. - + In TJA files, metadata lines are denoted by a colon (':'). These lines provide general info about the song (BPM, TITLE, OFFSET, etc.). They also define properties for each course in the song (difficulty, level, etc.). diff --git a/src/tja2fumen/types.py b/src/tja2fumen/types.py index ef98522..91649a3 100644 --- a/src/tja2fumen/types.py +++ b/src/tja2fumen/types.py @@ -104,7 +104,7 @@ class FumenMeasure(DefaultObject): self.branches = {b: FumenBranch() for b in BRANCH_NAMES} self.padding1 = padding1 self.padding2 = padding2 - + def set_duration(self, time_sig, measure_length, subdivisions): """Compute the millisecond duration of the measure.""" # First, we compute the duration for a full 4/4 measure. @@ -139,7 +139,7 @@ class FumenMeasure(DefaultObject): # Compute the end offset by adding the duration to the start offset self.offset_end = self.offset_start + self.duration - + def set_branch_info(self, branch_condition, branch_points_total, current_branch, first_branch_condition, has_section): """Compute the values that represent branching/diverge conditions."""