CaptainAni187 commented on issue #72694: URL: https://github.com/apache/airflow/issues/72694#issuecomment-5584845031
Reproduced this on main and opened #72703. Your diagnosis matches what I found, so I went with formatting the magnitude and re-applying the sign at the end. That leaves the output for non-negative durations untouched and gets the two input branches to agree. One judgement call worth flagging: a magnitude under a second still renders `<1s` rather than `-<1s`. The sign doesn't really tell you anything at that resolution, but it does mean `timedelta(seconds=-0.4)` and `timedelta(seconds=0.4)` are indistinguishable in the output. Easy to change if you'd rather it be explicit. I also ran `td_format(-x) == '-' + td_format(x)` over 20k random durations for both input types, plus cross-type agreement, and got no violations. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
