RadonMetrics/CyclomaticComplexityDialog.py

changeset 69
cdf51e6abaee
parent 68
69445de59a30
child 71
1e69db534be1
--- a/RadonMetrics/CyclomaticComplexityDialog.py	Wed Jan 01 11:58:55 2020 +0100
+++ b/RadonMetrics/CyclomaticComplexityDialog.py	Tue Jun 23 19:05:15 2020 +0200
@@ -8,13 +8,6 @@
 complexity).
 """
 
-from __future__ import unicode_literals
-
-try:
-    str = unicode       # __IGNORE_EXCEPTION__ __IGNORE_WARNING__
-except NameError:
-    pass
-
 import os
 import fnmatch
 import sys
@@ -310,7 +303,7 @@
             
             # now go through all the files
             self.progress = 0
-            if len(self.files) == 1 or not self.radonService.hasBatch:
+            if len(self.files) == 1:
                 self.__batch = False
                 self.cyclomaticComplexity()
             else:
@@ -553,20 +546,24 @@
         dataChanged = False
         
         filterString = self.excludeFilesEdit.text()
-        if "ExcludeFiles" not in self.__data or \
-           filterString != self.__data["ExcludeFiles"]:
+        if (
+            "ExcludeFiles" not in self.__data or
+            filterString != self.__data["ExcludeFiles"]
+        ):
             self.__data["ExcludeFiles"] = filterString
             dataChanged = True
         filterList = [f.strip() for f in filterString.split(",")
                       if f.strip()]
         if filterList:
             for fileFilter in filterList:
-                fileList = \
-                    [f for f in fileList if not fnmatch.fnmatch(f, fileFilter)]
+                fileList = [f for f in fileList
+                            if not fnmatch.fnmatch(f, fileFilter)]
         
         minimumRank = self.rankComboBox.currentText()
-        if "MinimumRank" not in self.__data or \
-           minimumRank != self.__data["MinimumRank"]:
+        if (
+            "MinimumRank" not in self.__data or
+            minimumRank != self.__data["MinimumRank"]
+        ):
             self.__data["MinimumRank"] = minimumRank
             dataChanged = True
         

eric ide

mercurial