Skip to content

Commit

Permalink
Simply add the string we want
Browse files Browse the repository at this point in the history
I must have been fixated on using `replace()`.
After already splitting the string, using the part we don't want seems silly.
  • Loading branch information
tcely authored Feb 1, 2025
1 parent 78e422f commit fefe1fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tubesync/sync/templatetags/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'

0 comments on commit fefe1fb

Please sign in to comment.