Fix newly-added black rules

This commit is contained in:
Alan Rominger 2022-01-29 23:17:58 -05:00
parent 2de5ffc8d9
commit 6b25fcaa80
No known key found for this signature in database
GPG Key ID: C2D7EAAA12B63559
2 changed files with 2 additions and 2 deletions

View File

@ -862,7 +862,7 @@ class UnifiedJobSerializer(BaseSerializer):
if 'elapsed' in ret:
if obj and obj.pk and obj.started and not obj.finished:
td = now() - obj.started
ret['elapsed'] = (td.microseconds + (td.seconds + td.days * 24 * 3600) * 10 ** 6) / (10 ** 6 * 1.0)
ret['elapsed'] = (td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) / (10**6 * 1.0)
ret['elapsed'] = float(ret['elapsed'])
# Because this string is saved in the db in the source language,
# it must be marked for translation after it is pulled from the db, not when set

View File

@ -255,7 +255,7 @@ def random_ipv4():
def random_ipv6():
"""Generates a random ipv6 address;; useful for testing."""
return ':'.join('{0:x}'.format(random.randint(0, 2 ** 16 - 1)) for i in range(8))
return ':'.join('{0:x}'.format(random.randint(0, 2**16 - 1)) for i in range(8))
def random_loopback_ip():