Skip to content

Commit cfb4782

Browse files
committed
Fix format
1 parent 03617a2 commit cfb4782

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

src/prediction/dataset.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ def __init__(
4343

4444
self.n_seconds = n_seconds
4545

46-
assert (
47-
self.overlap_ratio >= 0 and self.overlap_ratio < 1
48-
), "Overlap ratio must be between 0 and 1."
46+
assert self.overlap_ratio >= 0 and self.overlap_ratio < 1, (
47+
"Overlap ratio must be between 0 and 1."
48+
)
4949

5050
self.compute_segments_per_file()
5151

@@ -91,6 +91,7 @@ def compute_segments_per_file(self):
9191
for j in range(n_s):
9292
self.index[i] = (filepath, j)
9393
i += 1
94+
9495
except Exception as e:
9596
print(f"Error processing file {filepath}")
9697

@@ -184,9 +185,9 @@ def __init__(
184185
self.last_chunk_ratio = last_chunk_ratio
185186

186187
assert 0 < self.overlap_ratio < 1, "overlap_ratio must be between 0 and 1."
187-
assert (
188-
0 < self.last_chunk_ratio < 1
189-
), "last_chunk_ratio must be between 0 and 1."
188+
assert 0 < self.last_chunk_ratio < 1, (
189+
"last_chunk_ratio must be between 0 and 1."
190+
)
190191

191192
def setup(self, stage: str) -> None:
192193
if stage == "predict":

0 commit comments

Comments
 (0)