| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
The final branch of naturaldelta (years > 1) always returned a bare
year count even when months=True. A TODO comment in the code already
identified this gap. Now, when use_months is True and the remaining
days round to 1-11 months, the output includes the month count
('4 years, 7 months'). When they round to 12 months the year count
is incremented instead, consistent with the years == 1 branch.
Test expectations updated to reflect the corrected output.
Fixes python-humanize#108
for more information, see https://pre-commit.ci
Codecov Report❌ Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.
@@ Coverage Diff @@
## main #350 +/- ##
==========================================
- Coverage 99.56% 99.34% -0.22%
==========================================
Files 12 12
Lines 913 920 +7
==========================================
+ Hits 909 914 +5
- Misses 4 6 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness.
|
Sorry, something went wrong.
|
Can anyone from the team review this PR please @EdwardBetts @joemaller @bbolli @aborruso |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #108
Changes proposed in this pull request:
Summary
naturaldelta(timedelta(days=int(4.6*365)), months=True) returned "4 years" instead of "4 years, 7 months". A # TODO comment in the source already identified this gap.
Changes
Testing
Fixes #108