| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Codecov ReportAll modified and coverable lines are covered by tests ✅ Additional details and impacted files @@ Coverage Diff @@
## main #240 +/- ##
=======================================
Coverage 99.49% 99.49%
=======================================
Files 11 11
Lines 796 796
=======================================
Hits 792 792
Misses 4 4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry.
|
Sorry, something went wrong.
|
Hi @hugovk That's actually wonderful. I can accept either behaviour, but I wanted it to be stable. Your additional tests really help with that. Ironically the change in behaviour popped up because my tests spotted it. My local fix was also to convert the bytes to an integer. I do have cases where I'm looking at the average-bytes-per-second so it might not be an integer. However, naturalsize does say it's trying to be like a file size so integers do make sense. The proposed fix does an int rather than rounding it and as we know:
which is tolerable, but not what I'd expect from humanize. That's mostly because I've been so impressed by how humanize has given me great outputs for so long. It looks like you are chatting about rounding down in naturaldelta too too. So, in summary, I'd be fine with it going in this way. I really appreciate you getting to this so quickly. |
Sorry, something went wrong.
|
Yeah, and it matches the behaviour of the earlier percent formatting: >>> "%d" % 2.7
'2'
>>> int(2.7)
2I'm open to changing the rounding, but let's do it in a more intentional way than a bad formatting upgrade :) |
Sorry, something went wrong.
|
You're welcome! 🚀 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #239.