HF RL Explorer

human-readable file sizes: fix bug

human-readable file sizes: fix bug: a task in smol-software-harbor (Harbor dataset). The backup report shows sizes like 1024.0 KiB . human() in sizes.py picks the unit before rounding; as its docstring says, the unit must be chosen after rounding to one decimal (so 1048556 bytes prints 1.0 MiB )…

The task

The backup report shows sizes like `1024.0 KiB`. `human()` in `sizes.py` picks the unit before rounding; as its docstring says, the unit must be chosen after rounding to one decimal (so 1048556 bytes prints `1.0 MiB`). Fix it and run `python3 -m pytest -q`.

Part of efederici/smol-software-harbor.