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"
|
" timeout: %u seconds%s"
|
||||||
% (
|
% (
|
||||||
rt,
|
rt,
|
||||||
|
(
|
||||||
""
|
""
|
||||||
if ts is None
|
if ts is None
|
||||||
else (" (circa %s sec left)" % ((cr + (rt * 1000) - ts) / 1000.0)),
|
else (" (circa %s sec left)" % ((cr + (rt * 1000) - ts) / 1000.0))
|
||||||
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
print(
|
print(
|
||||||
|
@@ -2329,12 +2329,16 @@ class IP4Config(ExportedObj):
|
|||||||
a = {
|
a = {
|
||||||
"dest": Util.random_ip(seed, net="192.168.0.0/16")[0],
|
"dest": Util.random_ip(seed, net="192.168.0.0/16")[0],
|
||||||
"prefix": Util.random_int(seed, 17, 32),
|
"prefix": Util.random_int(seed, 17, 32),
|
||||||
"next-hop": None
|
"next-hop": (
|
||||||
|
None
|
||||||
if (Util.random_int(seed) % 3 == 0)
|
if (Util.random_int(seed) % 3 == 0)
|
||||||
else Util.random_ip(seed, net="192.168.0.0/16")[0],
|
else Util.random_ip(seed, net="192.168.0.0/16")[0]
|
||||||
"metric": -1
|
),
|
||||||
|
"metric": (
|
||||||
|
-1
|
||||||
if (Util.random_int(seed) % 3 == 0)
|
if (Util.random_int(seed) % 3 == 0)
|
||||||
else Util.random_int(seed, 0, 0xFFFFFFFF),
|
else Util.random_int(seed, 0, 0xFFFFFFFF)
|
||||||
|
),
|
||||||
}
|
}
|
||||||
routes.append(a)
|
routes.append(a)
|
||||||
|
|
||||||
@@ -2527,12 +2531,16 @@ class IP6Config(ExportedObj):
|
|||||||
a = {
|
a = {
|
||||||
"dest": Util.random_ip(seed, net="2001:a::/64")[0],
|
"dest": Util.random_ip(seed, net="2001:a::/64")[0],
|
||||||
"prefix": Util.random_int(seed, 65, 128),
|
"prefix": Util.random_int(seed, 65, 128),
|
||||||
"next-hop": None
|
"next-hop": (
|
||||||
|
None
|
||||||
if (Util.random_int(seed) % 3 == 0)
|
if (Util.random_int(seed) % 3 == 0)
|
||||||
else Util.random_ip(seed, net="2001:a::/64")[0],
|
else Util.random_ip(seed, net="2001:a::/64")[0]
|
||||||
"metric": -1
|
),
|
||||||
|
"metric": (
|
||||||
|
-1
|
||||||
if (Util.random_int(seed) % 3 == 0)
|
if (Util.random_int(seed) % 3 == 0)
|
||||||
else Util.random_int(seed, 0, 0xFFFFFFFF),
|
else Util.random_int(seed, 0, 0xFFFFFFFF)
|
||||||
|
),
|
||||||
}
|
}
|
||||||
routes.append(a)
|
routes.append(a)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user