mirror of
https://github.com/ansible/awx.git
synced 2026-01-09 23:12:08 -03:30
Fix newly-added black rules
This commit is contained in:
parent
2de5ffc8d9
commit
6b25fcaa80
@ -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
|
||||
|
||||
@ -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():
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user