python: reformat with black-24.1.1-1.fc39.noarch
This commit is contained in:
@@ -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(
|
||||
|
@@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user