accessmod/utils.py
def _human_readable_size(size, decimals=1):
    """Transform size in bytes into human readable text."""
    for unit in ["B", "KB", "MB", "GB", "TB"]:
        if size < 1000:
            break
        size /= 1000
    return f"{size:.{decimals}f} {unit}"
Transform size in bytes into human readable text.
Transform size in bytes into human readable text.
Transform size in bytes into human readable text .
def _human_readable_size(size, decimals=1):
    for unit in ["B", "KB", "MB", "GB", "TB"]:
        if size < 1000:
            break
        size /= 1000
    return f"{size:.{decimals}f} {unit}"
def _human_readable_size ( size , decimals = 1 ) : for unit in [ "B" , "KB" , "MB" , "GB" , "TB" ] : if size < 1000 : break size /= 1000 return f"{size:.{decimals}f} {unit}"
Transform size in bytes into human readable text.
Transform size in bytes into human readable text .
"""Transform size in bytes into human readable text."""
size
decimals