Updated human_readable to use python3 syntax

This commit is contained in:
Nanda Scott 2018-10-23 16:08:23 -04:00
parent 3578469723
commit 2c620ab8a6
1 changed files with 2 additions and 2 deletions

View File

@ -110,10 +110,10 @@ class BulkData(object):
for unit in ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB']: for unit in ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB']:
if abs(before) < 1024.0: if abs(before) < 1024.0:
return '%3.1f%s' % (before, unit) return '{:3.1f}{}'.format(before, unit)
before /= 1024.0 before /= 1024.0
return '%.1f%s' % (before, 'YiB') return '{:.1f}{}'.format(before, 'YiB')
return self.scryfallJson['data'][num]['compressed_size'] return self.scryfallJson['data'][num]['compressed_size']