unify K output

This commit is contained in:
holger krekel
2025-10-20 15:15:42 +02:00
parent 93421b317b
commit eb221ca1af

View File

@@ -33,11 +33,9 @@ def D(timestamp, now=datetime.utcnow().timestamp()):
def K(size):
if size < 1000:
return f"{size:6.0f}"
elif size < 10000:
if size < 10000:
return f"{size / 1000:5.2f}K"
return f"{int(size / 1000):5.0f}K"
return f"{size / 1000:5.0f}K"
def M(size):