mirror of
https://github.com/MadsLorentzen/ai-job-search.git
synced 2026-09-17 00:26:26 +00:00
fix(convert-salary-excel): reject ambiguous dot thousands separators (#326)
This commit is contained in:
@@ -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