mirror of
https://github.com/MadsLorentzen/ai-job-search.git
synced 2026-11-02 13:12:50 +00:00
Fix salary tool edge cases (#75)
* fix: handle salary tool edge cases * fix: preserve Danish salary compounds
This commit is contained in:
1 parent
d4415dff16
commit
9e26de2c67
4 files changed
+68
-10
No files matched your search
+5
-2
@@ -204,12 +204,15 @@ def format_entry(entry, metadata):
|
||||
count = data.get("count")
|
||||
index = data.get("index")
|
||||
if count is not None or index is not None:
|
||||
count_str = str(count) if count else "-"
|
||||
if index is not None:
|
||||
count_str = str(count) if count is not None else "-"
|
||||
if isinstance(index, (int, float)):
|
||||
diff = index - baseline
|
||||
sign = "+" if diff >= 0 else ""
|
||||
index_str = f"{index:.1f}"
|
||||
diff_str = f"{sign}{diff:.1f}%"
|
||||
elif index is not None:
|
||||
index_str = str(index)
|
||||
diff_str = ""
|
||||
else:
|
||||
index_str = "N/A*"
|
||||
diff_str = ""
|
||||
|
||||
Reference in new issue
Block a user