Utils and better handling

This commit is contained in:
Firq 2024-10-04 15:03:44 +02:00
parent 1eafc1a0e1
commit 8d2de1766b
Signed by: Firq
GPG key ID: 3ACC61C8CEC83C20
6 changed files with 36 additions and 12 deletions
support_formatter/logic

View file

@ -1,6 +1,9 @@
import csv
import pathlib
from ..utils import convert_to_bool
class FileTypeInvalidError(ValueError):
pass
@ -30,7 +33,7 @@ def process_csv(path: pathlib.Path):
entry.update({
"level": int(entry['level']),
"np_level": int(entry['np_level']),
"bce": bool(entry["bce"])
"bce": convert_to_bool(entry["bce"])
})
else:
entry.update({