Skip to content

Commit 9b82ffe

Browse files
committed
chore: formatting
1 parent 7095b4f commit 9b82ffe

2 files changed

Lines changed: 9 additions & 12 deletions

File tree

build-checks.py

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
# Optional: Use colorama for colored terminal output if available
1010
try:
1111
from colorama import Fore, Style, init as colorama_init
12+
1213
colorama_init()
1314
ERROR_COLOR = Fore.RED + Style.BRIGHT
1415
RESET_COLOR = Style.RESET_ALL
@@ -64,9 +65,7 @@ def checkDuplicateFilenamesInCSV() -> int:
6465

6566
def checkFilesInSoundsNotInCSV() -> int:
6667
"""Check for .wav files in SOUNDS not referenced in any CSV file, skipping ignored folders."""
67-
logging.info(
68-
"SOUNDS: Checking for files in SOUNDS not referenced in any CSV file ..."
69-
)
68+
logging.info("SOUNDS: Checking for files in SOUNDS not referenced in any CSV file ...")
7069
referenced_files = set()
7170
for f in csv_directory.glob("*.csv"):
7271
for row in read_csv_rows(str(f)):
@@ -95,9 +94,7 @@ def checkCSVcolumnCount() -> int:
9594
for row in read_csv_rows(str(f)):
9695
row = [field.strip() for field in row]
9796
if not len(row) == 6:
98-
logging.error(
99-
f"{ERROR_COLOR}[ERROR] {f.name}: Insufficient columns of data - {row}{RESET_COLOR}"
100-
)
97+
logging.error(f"{ERROR_COLOR}[ERROR] {f.name}: Insufficient columns of data - {row}{RESET_COLOR}")
10198
missing_csv_field = True
10299
continue
103100

@@ -116,9 +113,7 @@ def checkFilenameLengthsInCSV() -> int:
116113
if len(row) == 6:
117114
filename_in_csv = row[5].strip()
118115
if len(Path(filename_in_csv).stem) > 8:
119-
logging.error(
120-
f"{ERROR_COLOR}[ERROR] {f.name}: Filename too long - {filename_in_csv}{RESET_COLOR}"
121-
)
116+
logging.error(f"{ERROR_COLOR}[ERROR] {f.name}: Filename too long - {filename_in_csv}{RESET_COLOR}")
122117
invalid_filename_found = True
123118
return 1 if invalid_filename_found else 0
124119

@@ -171,9 +166,7 @@ def checkForDuplicateStringID() -> int:
171166
for f in csv_directory.glob("*.csv"):
172167
with open(f, "rt") as csvfile:
173168
reader = csv.reader(csvfile, delimiter=",", quotechar='"')
174-
reader = (
175-
(field.strip() for field in row) for row in reader
176-
) # Strip spaces
169+
reader = ((field.strip() for field in row) for row in reader) # Strip spaces
177170
line_count = 0
178171
StringID_count = {}
179172
for row in reader:

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@ dependencies = [
88
"colorama",
99
"ffmpeg-normalize",
1010
]
11+
12+
[tool.ruff]
13+
# Allow lines to be as long as 120.
14+
line-length = 120

0 commit comments

Comments
 (0)