FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Pluralization bug with Duration.in_words() by Solipsistmonkey · Pull Request #826 · python-pendulum/pendulum · GitHub

Pluralization bug with Duration.in_words() - #826

Merged
ashb merged 7 commits into
python-pendulum:masterfrom
Solipsistmonkey:master
Jul 17, 2025
Merged

Pluralization bug with Duration.in_words()#826
ashb merged 7 commits into
python-pendulum:masterfrom
Solipsistmonkey:master

Conversation

Copy link
Copy Markdown
Contributor

I noticed that Duration(milliseconds=10).in_words() would return 0.01 second when it should be 0.01 seconds. So I fixed that but also realized that sometimes people might want a bit more precision so I added a keyword arg seconds_n_digits with a default value of 2.

Comment thread src/pendulum/duration.py Outdated
Co-authored-by: Vasco Schiavo <115561717+VascoSch92@users.noreply.github.com>
Comment thread src/pendulum/duration.py Outdated
Comment thread src/pendulum/duration.py Outdated
Comment thread src/pendulum/duration.py Outdated
Comment thread src/pendulum/duration.py Outdated
Comment thread src/pendulum/duration.py Outdated
Separating out fix from adding seoncds_n_decimal

codspeed-hq Bot commented Jul 16, 2025
edited
Loading

Copy link
Copy Markdown

CodSpeed Performance Report

Merging #826 will not alter performance

Comparing Solipsistmonkey:master (f454f09) with master (b45e22d)

Summary

✅ 1 untouched benchmarks

Comment thread src/pendulum/duration.py Outdated
Comment thread src/pendulum/duration.py Outdated
Comment thread tests/duration/test_in_words.py Outdated
Comment thread src/pendulum/duration.py Outdated
Comment thread src/pendulum/duration.py Outdated
ashb merged commit 2adcc02 into python-pendulum:master Jul 17, 2025
18 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL