Added rounding for floating_humanizer() short option

pull/135/head
aristocratos 2020-09-20 19:30:07 +02:00
parent aebc82eb35
commit 0de2903045
1 changed files with 2 additions and 1 deletions

View File

@ -4460,7 +4460,8 @@ def floating_humanizer(value: Union[float, int], bit: bool = False, per_second:
if short:
out = out.split(".")[0]
if "." in out:
out = f'{round(float(out))}'
if len(out) > 3:
out = f'{int(out[0]) + 1}'
selector += 1