Skip to content

harbor_cli.output.formatting.bytes

Attributes

Functions

bytesize_str(b: int | None, decimal: bool = False) -> str

Source code in harbor_cli/output/formatting/bytes.py
def bytesize_str(b: int | None, decimal: bool = False) -> str:
    if b is None or b < 0:
        return NONE_STR
    return ByteSize(b).human_readable(decimal=decimal)