Coverage for harbor_cli/output/formatting/bytes.py: 100%

4 statements  

« prev     ^ index     » next       coverage.py v6.5.0, created at 2023-02-09 12:09 +0100

1from __future__ import annotations 

2 

3from pydantic import ByteSize 

4 

5 

6def bytesize_str(b: int, decimal: bool = False) -> str: 

7 return ByteSize(b).human_readable(decimal=decimal)