@@ -263,9 +263,7 @@ def ExpandBackticks(origvalue):
263
263
264
264
return out .strip ()
265
265
266
- value = reBackticks .sub (_exec , origvalue )
267
-
268
- return value
266
+ return reBackticks .sub (_exec , origvalue )
269
267
270
268
271
269
# We monkey-patch the config parser to provide an alternative method that
@@ -1488,12 +1486,11 @@ class Test:
1488
1486
self .diagmsgs += [f"'{ cmdline } ' succeeded unexpectedly (exit code 0)" ]
1489
1487
return (False , 0 )
1490
1488
1491
- else :
1492
- if not cmd .expect_success :
1493
- return (True , rc )
1489
+ if not cmd .expect_success :
1490
+ return (True , rc )
1494
1491
1495
- self .diagmsgs += [f"'{ cmdline } ' failed unexpectedly (exit code { rc } )" ]
1496
- return (False , rc )
1492
+ self .diagmsgs += [f"'{ cmdline } ' failed unexpectedly (exit code { rc } )" ]
1493
+ return (False , rc )
1497
1494
1498
1495
def rmTmp (self , * , with_close = False ):
1499
1496
if with_close :
@@ -1553,8 +1550,8 @@ class Test:
1553
1550
def timePostfix (self ):
1554
1551
if self .utime_base >= 0 and self .utime >= 0 :
1555
1552
return f" ({ self .utime_perc :+.1f} %)"
1556
- else :
1557
- return ""
1553
+
1554
+ return ""
1558
1555
1559
1556
# Picks up any progress output that has a test has written out.
1560
1557
def parseProgress (self ):
@@ -1612,8 +1609,8 @@ class OutputHandler:
1612
1609
# requested, plus 1 for "#".
1613
1610
width = len (str (self .options ().threads )) + 1
1614
1611
return f"[{ mp .current_process ().name :>{width }} ]"
1615
- else :
1616
- return ""
1612
+
1613
+ return ""
1617
1614
1618
1615
def _output (self , msg , nl = True , file = None ):
1619
1616
if not file :
@@ -2555,10 +2552,10 @@ def readTestFile(filename):
2555
2552
t = Test (filename )
2556
2553
if t .parse (content , filename ):
2557
2554
return t
2558
- else :
2559
- return None
2560
- else :
2561
- return previous .clone (content )
2555
+
2556
+ return None
2557
+
2558
+ return previous .clone (content )
2562
2559
2563
2560
if os .path .basename (filename ) == ".btest-ignore" :
2564
2561
return []
0 commit comments