MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / _format_bytes

Method _format_bytes

utils.py:959–965  ·  view source on GitHub ↗

Format bytes to human readable format

(bytes_value)

Source from the content-addressed store, hash-verified

957
958 @staticmethod
959 def _format_bytes(bytes_value):
960 """Format bytes to human readable format"""
961 for unit in ['B', 'KB', 'MB', 'GB']:
962 if bytes_value < 1024.0:
963 return f"{bytes_value:.1f} {unit}"
964 bytes_value /= 1024.0
965 return f"{bytes_value:.1f} TB"
966
967 @staticmethod
968 def _format_timestamp(timestamp):

Callers 1

get_loot_dataMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected