feat(py-monitor): add normalize_condition()
This commit is contained in:
1 parent
0a7dbdd3e2
commit
3bf72aea76
1 file changed
+5
@@ -26,3 +26,8 @@ def parse_price(s):
|
||||
return None
|
||||
|
||||
|
||||
def normalize_condition(value):
|
||||
"""Map a category-specific condition label onto the canonical set."""
|
||||
if not value:
|
||||
return None
|
||||
return CONDITION_MAP.get(str(value).strip().lower())
|
||||
Reference in new issue
Block a user