python: reformat with black-24.1.1-1.fc39.noarch

This commit is contained in:
Jan Vaclav
2024-02-19 12:20:33 +01:00
committed by Íñigo Huguet
parent 61f0531509
commit 47f01c805d
2 changed files with 25 additions and 15 deletions

View File

@@ -45,9 +45,11 @@ def show(c, ts=None):
" timeout: %u seconds%s"
% (
rt,
""
if ts is None
else (" (circa %s sec left)" % ((cr + (rt * 1000) - ts) / 1000.0)),
(
""
if ts is None
else (" (circa %s sec left)" % ((cr + (rt * 1000) - ts) / 1000.0))
),
)
)
print(

View File

@@ -2329,12 +2329,16 @@ class IP4Config(ExportedObj):
a = {
"dest": Util.random_ip(seed, net="192.168.0.0/16")[0],
"prefix": Util.random_int(seed, 17, 32),
"next-hop": None
if (Util.random_int(seed) % 3 == 0)
else Util.random_ip(seed, net="192.168.0.0/16")[0],
"metric": -1
if (Util.random_int(seed) % 3 == 0)
else Util.random_int(seed, 0, 0xFFFFFFFF),
"next-hop": (
None
if (Util.random_int(seed) % 3 == 0)
else Util.random_ip(seed, net="192.168.0.0/16")[0]
),
"metric": (
-1
if (Util.random_int(seed) % 3 == 0)
else Util.random_int(seed, 0, 0xFFFFFFFF)
),
}
routes.append(a)
@@ -2527,12 +2531,16 @@ class IP6Config(ExportedObj):
a = {
"dest": Util.random_ip(seed, net="2001:a::/64")[0],
"prefix": Util.random_int(seed, 65, 128),
"next-hop": None
if (Util.random_int(seed) % 3 == 0)
else Util.random_ip(seed, net="2001:a::/64")[0],
"metric": -1
if (Util.random_int(seed) % 3 == 0)
else Util.random_int(seed, 0, 0xFFFFFFFF),
"next-hop": (
None
if (Util.random_int(seed) % 3 == 0)
else Util.random_ip(seed, net="2001:a::/64")[0]
),
"metric": (
-1
if (Util.random_int(seed) % 3 == 0)
else Util.random_int(seed, 0, 0xFFFFFFFF)
),
}
routes.append(a)