Commit Graph
4 Commits
Author SHA1 Message Date
dualfroz a0b5007d40 fix: reject stray pipe in sign by using [+-] character class
Inside a character class '|' is a literal, so [+|-] matched '+', '-', or
'|'. A leading pipe was captured as a sign and stripped, letting malformed
input like '|5m' parse to 300 instead of returning None. Restrict the
class to the two intended sign characters.
2026-09-04 22:00:22 +02:00
upstream 9b5ce3ede3 Upstream wroberts/pytimeparse state of the touched files before a9e844e72e 2026-09-04 09:31:35 +02:00
dualfroz 7b055c8116 fix: round decimal unit values instead of truncating in integer path
Multiplying a decimal quantity by its unit multiplier in binary floating
point can land just below the exact integer (float('2.05') * 60 ==
122.999...), so int() truncated 2.05m to 122 seconds instead of 123.
Round the sub-second unit contribution before adding whole seconds.
2026-09-04 09:22:40 +02:00
upstream 546a3e846e Upstream wroberts/pytimeparse state of the touched files before 30c5a331a8 2026-09-04 09:22:40 +02:00