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

Fix regression in `naturalsize` for float and str by loicleyendecker · Pull Request #250 · python-humanize/humanize · GitHub

Fix regression in naturalsize for float and str - #250

Merged
hugovk merged 1 commit into
python-humanize:mainfrom
loicleyendecker:main
Apr 10, 2025
Merged

Fix regression in naturalsize for float and str#250
hugovk merged 1 commit into
python-humanize:mainfrom
loicleyendecker:main

Conversation

Copy link
Copy Markdown
Contributor

Currently if gnu is set to False, calling naturalsize(1.0) or naturalsize("1") will return "1.0 Byte instead of "1 Byte", which was the return value until 4.12.

codecov Bot commented Apr 9, 2025
edited
Loading

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.49%. Comparing base (8059ebe) to head (a79fb3a).
Report is 11 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #250   +/-   ##
=======================================
  Coverage   99.49%   99.49%           
=======================================
  Files          11       11           
  Lines         798      798           
=======================================
  Hits          794      794           
  Misses          4        4           
Flag Coverage Δ
macos-latest 97.74% <100.00%> (ø)
ubuntu-latest 97.74% <100.00%> (ø)
windows-latest 95.73% <100.00%> (ø)

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

☔ View full report in Codecov by Sentry.
📢 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.

hugovk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks for the fix.

Like #239, this was also caused by #226 and this is the similar fix for the other case.

Comment thread tests/test_filesize.py Outdated
hugovk added the changelog: Fixed For any bug fixes label Apr 9, 2025
hugovk changed the title 1.0 Byte should be displayed as 1 Byte Fix regression in naturalsize for float and int Apr 10, 2025
hugovk changed the title Fix regression in naturalsize for float and int Fix regression in naturalsize for float and str Apr 10, 2025
hugovk merged commit 2968d44 into python-humanize:main Apr 10, 2025

hugovk commented Apr 10, 2025

Copy link
Copy Markdown
Member

Thanks!

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

changelog: Fixed For any bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL