Simply add the string we want

I must have been fixated on using `replace()`.
After already splitting the string, using the part we don't want seems silly.
This commit is contained in:
tcely 2025-02-01 02:28:23 -05:00 committed by GitHub
parent 78e422f563
commit fefe1fbc4d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -10,5 +10,5 @@ def bytesformat(input):
output = filesizeformat(input)
if not (output and output.endswith('B', -1)):
return output
return output[: -1 ] + output[ -1 :].replace('B', 'iB', 1)
return output[: -1 ] + 'iB'