Skip to content

Feature: Replace Custom Byte Conversion with humanize.naturalsize#44

Open
Sumit-ai-dev wants to merge 2 commits intohpc-io:masterfrom
Sumit-ai-dev:feature/humanize-bytes
Open

Feature: Replace Custom Byte Conversion with humanize.naturalsize#44
Sumit-ai-dev wants to merge 2 commits intohpc-io:masterfrom
Sumit-ai-dev:feature/humanize-bytes

Conversation

@Sumit-ai-dev
Copy link
Copy Markdown

Closes #28

This PR replaces the custom convert_bytes function in drishti/includes/config.py with humanize.naturalsize.

Changes:

  • Removed the manual loop and list of byte tags.
  • Implemented humanize.naturalsize(bytes_number, binary=True, format="%.2f") for robust formatting.
  • Added humanize to install_requires in setup.py and requirements.txt.

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.

[Feature]: Replace Custom Byte Conversion with humanize.naturalsize

1 participant