Fixed a few code style issues.

Sun, 23 May 2021 18:45:54 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 23 May 2021 18:45:54 +0200
changeset 8380
73ef1edca602
parent 8379
ef170cde761b
child 8381
600bf716cb9d

Fixed a few code style issues.

eric6/Debugger/DebugUI.py file | annotate | diff | comparison | revisions
eric6/PyUnit/UnittestDialog.py file | annotate | diff | comparison | revisions
--- a/eric6/Debugger/DebugUI.py	Sun May 23 18:39:22 2021 +0200
+++ b/eric6/Debugger/DebugUI.py	Sun May 23 18:45:54 2021 +0200
@@ -1404,21 +1404,20 @@
         @param debuggerId ID of the debugger backend
         @type str
         """
-        if debuggerId == self.getSelectedDebuggerId():
-            if scope > -2:
-                self.ui.activateDebugViewer()
-                if scope > 0:
-                    self.debugViewer.showVariables(variables, True)
-                    if scope == 1:
-                        # now get the local variables
-                        self.debugServer.remoteClientVariables(
-                            self.getSelectedDebuggerId(),
-                            0, self.__localsVarFilterList)
-                elif scope == 0:
-                    self.debugViewer.showVariables(variables, False)
-                elif scope == -1:
-                    vlist = [(self.tr('No locals available.'), '', '')]
-                    self.debugViewer.showVariables(vlist, False)
+        if debuggerId == self.getSelectedDebuggerId() and scope > -2:
+            self.ui.activateDebugViewer()
+            if scope > 0:
+                self.debugViewer.showVariables(variables, True)
+                if scope == 1:
+                    # now get the local variables
+                    self.debugServer.remoteClientVariables(
+                        self.getSelectedDebuggerId(),
+                        0, self.__localsVarFilterList)
+            elif scope == 0:
+                self.debugViewer.showVariables(variables, False)
+            elif scope == -1:
+                vlist = [(self.tr('No locals available.'), '', '')]
+                self.debugViewer.showVariables(vlist, False)
         
     def __clientVariable(self, scope, variables, debuggerId):
         """
--- a/eric6/PyUnit/UnittestDialog.py	Sun May 23 18:39:22 2021 +0200
+++ b/eric6/PyUnit/UnittestDialog.py	Sun May 23 18:45:54 2021 +0200
@@ -578,20 +578,18 @@
         @rtype list of str
         """
         selectedTests = []
-        if parent is None:
+        itemsList = [
             # top level
-            itemsList = [
-                self.discoveryList.topLevelItem(index)
-                for index in range(self.discoveryList.topLevelItemCount())
-            ]
-        else:
-            itemsList = [
-                parent.child(index)
-                for index in range(parent.childCount())
-            ]
+            self.discoveryList.topLevelItem(index)
+            for index in range(self.discoveryList.topLevelItemCount())
+        ] if parent is None else [
+            parent.child(index)
+            for index in range(parent.childCount())
+        ]
         
         for itm in itemsList:
-            if (itm.checkState(0) == Qt.CheckState.Checked and
+            if (
+                itm.checkState(0) == Qt.CheckState.Checked and
                 itm.childCount() == 0
             ):
                 selectedTests.append(

eric ide

mercurial