fix column matcher false-positive on shared table prefixes; round float durations for int columns

This commit is contained in:
Roberto Treviño Cervantes
2026-10-23 00:33:53 -06:00
parent c799e2ad90
commit 83c7c7f1d3
3 changed files with 30 additions and 3 deletions
+8
View File
@@ -31,6 +31,14 @@ def optional_str(v: Any) -> Any:
return text or None
def rounded_int(v: Any) -> Any:
"""A minutes/count field stored as an `int` column, whose source may
report a float (e.g. a duration measured to tenths of a minute)."""
if v is None or (isinstance(v, str) and v.strip() == ""):
return None
return round(float(v))
_DAY_FIRST_FORMATS = ("%d/%m/%Y", "%d-%m-%Y", "%d.%m.%Y", "%Y/%m/%d")