mirror of
https://github.com/MadsLorentzen/ai-job-search.git
synced 2026-11-02 13:12:50 +00:00
fix(convert-salary-excel): reject ambiguous dot thousands separators (#326)
This commit is contained in:
1 parent
45d55a7452
commit
621ce5ab39
3 files changed
+32
No files matched your search
@@ -70,6 +70,9 @@ def parse_numeric_cell(value):
|
||||
if re.fullmatch(r"[+-]?\d+,\d{3}", text):
|
||||
raise ValueError("ambiguous comma separator")
|
||||
text = text.replace(",", ".")
|
||||
elif "." in text:
|
||||
if re.fullmatch(r"[+-]?\d+\.\d{3}", text):
|
||||
raise ValueError("ambiguous dot separator")
|
||||
return float(text)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user