Skip to content

docs: align the naturaldelta example with minute rounding - #410

Open
Likio3000 wants to merge 1 commit into
python-humanize:mainfrom
Likio3000:docs/correct-naturaldelta-minute-example-20260923
Open

Likio3000 wants to merge 1 commit into
python-humanize:mainfrom
Likio3000:docs/correct-naturaldelta-minute-example-20260923

Conversation

@Likio3000

Copy link
Copy Markdown

The README still shows naturaldelta(timedelta(seconds=1001)) returning 16 minutes, although #272 changed naturaldelta to round to the nearest unit. Update the expected output to 17 minutes so the example matches the current implementation and documented behavior.

Changes proposed in this pull request:

  • Correct this one README output line; no implementation changes.

Validation: statically checked the minute branch (round(delta.seconds / 60)), the rounding docstring, the existing 1m29s/1m30s/1m59s test cases, and the changes in #272. Independently checked the arithmetic for 1001 seconds. I did not run Humanize, its test suite, linting, or the documentation build.

Prepared with assistance from OpenAI Codex.

@hugovk hugovk added documentation Improvements or additions to documentation changelog: skip Exclude PR from release draft labels Sep 26, 2026
@hugovk
hugovk enabled auto-merge (squash) September 26, 2026 21:05
@codecov

codecov Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.69%. Comparing base (392aef7) to head (bf5a961).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #410   +/-   ##
=======================================
  Coverage   99.69%   99.69%           
=======================================
  Files          12       12           
  Lines         996      996           
=======================================
  Hits          993      993           
  Misses          3        3           
Flag Coverage Δ
macos-latest 97.59% <ø> (ø)
ubuntu-latest 97.59% <ø> (ø)
windows-latest 93.27% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: skip Exclude PR from release draft documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants