fix(py): parity coercions — amount/message types + junior '?' sticky #25
Reference in New Issue
Block a user
Delete Branch "fix/py-parity-coercions"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Three
make paritydiffs fixed, all Python-side:match_payments.py— tx field coercionsamount: non-numeric sheet values like"---"were passed through as strings; Go'sparseFloatsilently returns0.0. Addedget_floathelper that matches.message: numeric cell values (bank references in the message column) came through asfloat64; Go'sgetValusesfmt.Sprint→ always a string. Appliedget_strtomessage.views.py— junior"?"cell text sticky across exception overridesbuild_juniorssetscellText = "?" + countStrwheneverIsUnknownis true, regardless of exceptions. Python was checkingexpected == "?", butreconcileoverwritesexpectedwith the exception amount (e.g.0) before the view builder runs — dropping the"?"to"-".is_unknownfromoriginal_expected == "?"(captured before exception substitution). Also aligned the tooltip guard to match Go: only show Received/Expected tooltip for non-unknown months (or when paid > 0).Test plan
make test— 31 tests, all greenmake web+POST /flush-cache, thenmake parity— confirm these three diffs gone🤖 Generated with Claude Code