[Analyzer] Make testing scripts flake8 compliant

Differential Review: https://reviews.llvm.org/D38213

llvm-svn: 314692
diff --git a/clang/utils/analyzer/SumTimerInfo.py b/clang/utils/analyzer/SumTimerInfo.py
index 0c3585b..50e1cb8 100644
--- a/clang/utils/analyzer/SumTimerInfo.py
+++ b/clang/utils/analyzer/SumTimerInfo.py
@@ -5,11 +5,8 @@
 
 Statistics are enabled by passing '-internal-stats' option to scan-build
 (or '-analyzer-stats' to the analyzer).
-
 """
 
-import string
-from operator import itemgetter
 import sys
 
 if __name__ == '__main__':
@@ -31,44 +28,42 @@
     NumInlinedCallSites = 0
     NumBifurcatedCallSites = 0
     MaxCFGSize = 0
-    Mode = 1
     for line in f:
-        if ("Miscellaneous Ungrouped Timers" in line) :
-          Mode = 1
-        if (("Analyzer Total Time" in line) and (Mode == 1)) :
-          s = line.split()
-          Time = Time + float(s[6])
-          Count = Count + 1
-          if (float(s[6]) > MaxTime) :
-            MaxTime = float(s[6])
-        if ((("warning generated." in line) or ("warnings generated" in line)) and Mode == 1) :
-          s = line.split()
-          Warnings = Warnings + int(s[0])
-        if (("The # of functions analysed (as top level)" in line) and (Mode == 1)) :
-          s = line.split()
-          FunctionsAnalyzed = FunctionsAnalyzed + int(s[0])
-        if (("The % of reachable basic blocks" in line) and (Mode == 1)) :
-          s = line.split()
-          ReachableBlocks = ReachableBlocks + int(s[0])
-        if (("The # of times we reached the max number of steps" in line) and (Mode == 1)) :
-          s = line.split()
-          ReachedMaxSteps = ReachedMaxSteps + int(s[0])
-        if (("The maximum number of basic blocks in a function" in line) and (Mode == 1)) :
-          s = line.split()
-          if (MaxCFGSize < int(s[0])) :
-            MaxCFGSize = int(s[0])
-        if (("The # of steps executed" in line) and (Mode == 1)) :
-          s = line.split()
-          NumSteps = NumSteps + int(s[0])
-        if (("The # of times we inlined a call" in line) and (Mode == 1)) :
-          s = line.split()
-          NumInlinedCallSites = NumInlinedCallSites + int(s[0])
-        if (("The # of times we split the path due to imprecise dynamic dispatch info" in line) and (Mode == 1)) :
-          s = line.split()
-          NumBifurcatedCallSites = NumBifurcatedCallSites + int(s[0])
-        if ((")  Total" in line) and (Mode == 1)) :
-          s = line.split()
-          TotalTime = TotalTime + float(s[6])
+        if ("Analyzer Total Time" in line):
+            s = line.split()
+            Time = Time + float(s[6])
+            Count = Count + 1
+            if (float(s[6]) > MaxTime):
+                MaxTime = float(s[6])
+        if ("warning generated." in line) or ("warnings generated" in line):
+            s = line.split()
+            Warnings = Warnings + int(s[0])
+        if "The # of functions analysed (as top level)" in line:
+            s = line.split()
+            FunctionsAnalyzed = FunctionsAnalyzed + int(s[0])
+        if "The % of reachable basic blocks" in line:
+            s = line.split()
+            ReachableBlocks = ReachableBlocks + int(s[0])
+        if "The # of times we reached the max number of steps" in line:
+            s = line.split()
+            ReachedMaxSteps = ReachedMaxSteps + int(s[0])
+        if "The maximum number of basic blocks in a function" in line:
+            s = line.split()
+            if MaxCFGSize < int(s[0]):
+                MaxCFGSize = int(s[0])
+        if "The # of steps executed" in line:
+            s = line.split()
+            NumSteps = NumSteps + int(s[0])
+        if "The # of times we inlined a call" in line:
+            s = line.split()
+            NumInlinedCallSites = NumInlinedCallSites + int(s[0])
+        if "The # of times we split the path due \
+                to imprecise dynamic dispatch info" in line:
+            s = line.split()
+            NumBifurcatedCallSites = NumBifurcatedCallSites + int(s[0])
+        if ")  Total" in line:
+            s = line.split()
+            TotalTime = TotalTime + float(s[6])
 
     print "TU Count %d" % (Count)
     print "Time %f" % (Time)
@@ -77,7 +72,8 @@
     print "Reachable Blocks %d" % (ReachableBlocks)
     print "Reached Max Steps %d" % (ReachedMaxSteps)
     print "Number of Steps %d" % (NumSteps)
-    print "Number of Inlined calls %d (bifurcated %d)" % (NumInlinedCallSites, NumBifurcatedCallSites)
+    print "Number of Inlined calls %d (bifurcated %d)" % (
+        NumInlinedCallSites, NumBifurcatedCallSites)
     print "MaxTime %f" % (MaxTime)
     print "TotalTime %f" % (TotalTime)
     print "Max CFG Size %d" % (MaxCFGSize)