You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "AhmedAli58 (via GitHub)" <gi...@apache.org> on 2026/02/18 12:30:55 UTC
[PR] Fix td_format zero duration behavior for 0 values [airflow]
AhmedAli58 opened a new pull request, #62123:
URL: https://github.com/apache/airflow/pull/62123
## What
Fix `td_format()` to treat zero durations as under one second (`<1s`) instead of returning `None`.\n\n## Why\nThe function docs state values below one second should return `<1s>`, but `0`, `0.0`, and `timedelta(0)` were treated as falsy and returned `None`.\n\n## How\n- Change the early-return guard from `if not td_object` to `if td_object is None`\n- Add regression tests for `timedelta(0)`, `0.0`, and `0`\n\n## Verification\n`PYTHONPATH=shared/timezones/src python3 -m pytest -q shared/timezones/tests`\n- 30 passed
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix td_format zero duration behavior for 0 values [airflow]
Posted by "vincbeck (via GitHub)" <gi...@apache.org>.
vincbeck merged PR #62123:
URL: https://github.com/apache/airflow/pull/62123
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix td_format zero duration behavior for 0 values [airflow]
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #62123:
URL: https://github.com/apache/airflow/pull/62123#issuecomment-3921574458
Awesome work, congrats on your first merged pull request! You are invited to check our [Issue Tracker](https://github.com/apache/airflow/issues) for additional contributions.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org