RadonMetrics/CyclomaticComplexityDialog.py

branch
eric7
changeset 109
47df4b69f699
parent 107
0843dd7239f6
child 110
261babeb7cc6
--- a/RadonMetrics/CyclomaticComplexityDialog.py	Sat May 27 15:34:14 2023 +0200
+++ b/RadonMetrics/CyclomaticComplexityDialog.py	Wed Aug 30 13:20:08 2023 +0200
@@ -125,7 +125,7 @@
         try:
             usesDarkPalette = ericApp().usesDarkPalette()
         except AttributeError:
-            from PyQt6.QtGui import QPalette
+            from PyQt6.QtGui import QPalette  # noqa: I101, I102
 
             palette = ericApp().palette()
             lightness = palette.color(QPalette.Window).lightness()
@@ -361,7 +361,7 @@
         try:
             self.source = Utilities.readEncodedFile(self.filename)[0]
             self.source = Utilities.normalizeCode(self.source)
-        except (UnicodeError, OSError) as msg:
+        except (OSError, UnicodeError) as msg:
             self.__createErrorItem(self.filename, str(msg).rstrip())
             self.progress += 1
             # Continue with next file
@@ -386,7 +386,7 @@
             try:
                 source = Utilities.readEncodedFile(filename)[0]
                 source = Utilities.normalizeCode(source)
-            except (UnicodeError, OSError) as msg:
+            except (OSError, UnicodeError) as msg:
                 self.__createErrorItem(filename, str(msg).rstrip())
                 continue
 
@@ -471,7 +471,7 @@
         """
         Private slot called when the action or the user pressed the button.
         """
-        from radon.complexity import cc_rank
+        from radon.complexity import cc_rank  # noqa: I102
 
         if not self.__finished:
             self.__finished = True

eric ide

mercurial