mirror of https://github.com/aristocratos/bpytop
Added rounding for floating_humanizer() short option
parent
aebc82eb35
commit
0de2903045
|
@ -4460,7 +4460,8 @@ def floating_humanizer(value: Union[float, int], bit: bool = False, per_second:
|
||||||
|
|
||||||
|
|
||||||
if short:
|
if short:
|
||||||
out = out.split(".")[0]
|
if "." in out:
|
||||||
|
out = f'{round(float(out))}'
|
||||||
if len(out) > 3:
|
if len(out) > 3:
|
||||||
out = f'{int(out[0]) + 1}'
|
out = f'{int(out[0]) + 1}'
|
||||||
selector += 1
|
selector += 1
|
||||||
|
|
Loading…
Reference in New Issue