Fixed some code style issues detected by the upgraded eradicate.py.

Wed, 13 Jan 2021 19:02:58 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 13 Jan 2021 19:02:58 +0100
changeset 7973
e836d196e888
parent 7972
4fc11172df1b
child 7974
f425b578ede7

Fixed some code style issues detected by the upgraded eradicate.py.

eric6/DebugClients/Python/DebugClientBase.py file | annotate | diff | comparison | revisions
eric6/DebugClients/Python/MultiProcessDebugExtension.py file | annotate | diff | comparison | revisions
eric6/Debugger/DebuggerInterfacePython.py file | annotate | diff | comparison | revisions
eric6/Graphics/AssociationItem.py file | annotate | diff | comparison | revisions
eric6/Plugins/CheckerPlugins/CodeStyleChecker/Security/SecurityNodeVisitor.py file | annotate | diff | comparison | revisions
eric6/Plugins/VcsPlugins/vcsMercurial/HgBookmarksInOutDialog.py file | annotate | diff | comparison | revisions
eric6/QScintilla/Exporters/ExporterPDF.py file | annotate | diff | comparison | revisions
eric6/Tasks/TaskFilter.py file | annotate | diff | comparison | revisions
eric6/Toolbox/SingleApplication.py file | annotate | diff | comparison | revisions
eric6/UI/BrowserModel.py file | annotate | diff | comparison | revisions
eric6/UI/UserInterface.py file | annotate | diff | comparison | revisions
eric6/Utilities/ClassBrowsers/pyclbr.py file | annotate | diff | comparison | revisions
eric6/Utilities/ModuleParser.py file | annotate | diff | comparison | revisions
eric6/WebBrowser/History/HistoryMenu.py file | annotate | diff | comparison | revisions
--- a/eric6/DebugClients/Python/DebugClientBase.py	Wed Jan 13 19:02:30 2021 +0100
+++ b/eric6/DebugClients/Python/DebugClientBase.py	Wed Jan 13 19:02:58 2021 +0100
@@ -316,7 +316,7 @@
         @param jsonStr string containing the command received from the IDE
         @type str
         """
-##        printerr(jsonStr)          ##debug
+##        printerr(jsonStr)          ## debug       # __IGNORE_WARNING_M891__
         
         try:
             commandDict = json.loads(jsonStr.strip())
@@ -618,8 +618,8 @@
                                     _locals = (
                                         self.currentThread.getFrameLocals(
                                             self.framenr))
-                            ## reset sys.stdout to our redirector
-                            ## (unconditionally)
+                            #- reset sys.stdout to our redirector
+                            #- (unconditionally)
                             if "sys" in _globals:
                                 __stdout = _globals["sys"].stdout
                                 _globals["sys"].stdout = self.writestream
--- a/eric6/DebugClients/Python/MultiProcessDebugExtension.py	Wed Jan 13 19:02:30 2021 +0100
+++ b/eric6/DebugClients/Python/MultiProcessDebugExtension.py	Wed Jan 13 19:02:58 2021 +0100
@@ -369,14 +369,14 @@
     import sys
     
     # patch 'os.exec...()' functions
-##    patchModule(os, "execl", createExecl)
-##    patchModule(os, "execle", createExecl)
-##    patchModule(os, "execlp", createExecl)
-##    patchModule(os, "execlpe", createExecl)
-##    patchModule(os, "execv", createExecv)
-##    patchModule(os, "execve", createExecve)
-##    patchModule(os, "execvp", createExecv)
-##    patchModule(os, "execvpe", createExecve)
+#-    patchModule(os, "execl", createExecl)
+#-    patchModule(os, "execle", createExecl)
+#-    patchModule(os, "execlp", createExecl)
+#-    patchModule(os, "execlpe", createExecl)
+#-    patchModule(os, "execv", createExecv)
+#-    patchModule(os, "execve", createExecve)
+#-    patchModule(os, "execvp", createExecv)
+#-    patchModule(os, "execvpe", createExecve)
     
     # patch 'os.spawn...()' functions
     patchModule(os, "spawnl", createSpawnl)
--- a/eric6/Debugger/DebuggerInterfacePython.py	Wed Jan 13 19:02:30 2021 +0100
+++ b/eric6/Debugger/DebuggerInterfacePython.py	Wed Jan 13 19:02:58 2021 +0100
@@ -1323,7 +1323,7 @@
                 encoding=Preferences.getSystem("StringEncoding"))
             
             logging.debug("<Debug-Server> %s", line)
-##            print("Server: ", line)          ##debug
+##            print("Server: ", line)    ## debug    # __IGNORE_WARNING_M891__
             
             self.__handleJsonCommand(line, sock)
     
--- a/eric6/Graphics/AssociationItem.py	Wed Jan 13 19:02:30 2021 +0100
+++ b/eric6/Graphics/AssociationItem.py	Wed Jan 13 19:02:58 2021 +0100
@@ -81,7 +81,7 @@
                 self.__calculateEndingPoints_topToBottom
             )
         else:
-            ## self.calculateEndingPoints = self.__calculateEndingPoints_center
+            #- self.calculateEndingPoints = self.__calculateEndingPoints_center
             self.calculateEndingPoints = self.__calculateEndingPoints_rectangle
         
         self.itemA = itemA
--- a/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Security/SecurityNodeVisitor.py	Wed Jan 13 19:02:30 2021 +0100
+++ b/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Security/SecurityNodeVisitor.py	Wed Jan 13 19:02:58 2021 +0100
@@ -238,11 +238,6 @@
         
         if hasattr(node, 'lineno'):
             self.__context['lineno'] = node.lineno
-##
-##            if node.lineno in self.nosec_lines:
-##                LOG.debug("skipped, nosec")
-##                self.metrics.note_nosec()
-##                return False
         
         self.__context['node'] = node
         self.__context['linerange'] = SecurityUtils.linerange_fix(node)
--- a/eric6/Plugins/VcsPlugins/vcsMercurial/HgBookmarksInOutDialog.py	Wed Jan 13 19:02:30 2021 +0100
+++ b/eric6/Plugins/VcsPlugins/vcsMercurial/HgBookmarksInOutDialog.py	Wed Jan 13 19:02:58 2021 +0100
@@ -7,8 +7,6 @@
 Module implementing a dialog to show a list of incoming or outgoing bookmarks.
 """
 
-##import os
-##
 from PyQt5.QtCore import Qt, QCoreApplication
 from PyQt5.QtWidgets import (
     QDialog, QDialogButtonBox, QHeaderView, QTreeWidgetItem
--- a/eric6/QScintilla/Exporters/ExporterPDF.py	Wed Jan 13 19:02:30 2021 +0100
+++ b/eric6/QScintilla/Exporters/ExporterPDF.py	Wed Jan 13 19:02:58 2021 +0100
@@ -37,7 +37,7 @@
 PDFfontWidths = [600, 0, 0]
 
 PDFpageSizes = {
-    ## name   : (height, width)
+    #- name   : (height, width)
     "Letter": (792, 612),
     "A4": (842, 595),
 }
--- a/eric6/Tasks/TaskFilter.py	Wed Jan 13 19:02:30 2021 +0100
+++ b/eric6/Tasks/TaskFilter.py	Wed Jan 13 19:02:58 2021 +0100
@@ -29,13 +29,13 @@
         # task type
         
         self.scopeFilter = None
-        ## global (False) or project (True)
+        #- global (False) or project (True)
         
         self.statusFilter = None
-        ## uncompleted (False) or completed (True)
+        #- not completed (False) or completed (True)
         
         self.prioritiesFilter = None
-        ## list of priorities [0 (high), 1 (normal), 2 (low)]
+        #- list of priorities [0 (high), 1 (normal), 2 (low)]
     
     def setActive(self, enabled):
         """
--- a/eric6/Toolbox/SingleApplication.py	Wed Jan 13 19:02:30 2021 +0100
+++ b/eric6/Toolbox/SingleApplication.py	Wed Jan 13 19:02:58 2021 +0100
@@ -62,7 +62,7 @@
         while self.qsock and self.qsock.canReadLine():
             line = bytes(self.qsock.readLine()).decode()
             
-##            print(line)          ##debug
+##            print(line)          ## debug         # __IGNORE_WARNING_M891__
             
             try:
                 commandDict = json.loads(line.strip())
--- a/eric6/UI/BrowserModel.py	Wed Jan 13 19:02:30 2021 +0100
+++ b/eric6/UI/BrowserModel.py	Wed Jan 13 19:02:58 2021 +0100
@@ -1469,10 +1469,10 @@
             if self._classObject.annotation:
                 self.itemData[0] = "{0} {1}".format(
                     self.itemData[0], self._classObject.annotation)
-            ## if no defaults are wanted
-            ## ....format(name,
-            ##            ", ".join([e.split('=')[0].strip() \
-            ##                       for e in self._classObject.parameters]))
+            #- if no defaults are wanted
+            #- ....format(name,
+            #-            ", ".join([e.split('=')[0].strip()
+            #-                       for e in self._classObject.parameters]))
         elif self.ismodule:
             self.icon = UI.PixmapCache.getIcon("module")
         elif self.isenum:
--- a/eric6/UI/UserInterface.py	Wed Jan 13 19:02:30 2021 +0100
+++ b/eric6/UI/UserInterface.py	Wed Jan 13 19:02:58 2021 +0100
@@ -639,8 +639,8 @@
 
         # now redirect stdout and stderr
         # TODO: release - reenable redirection
-##        sys.stdout = self.stdout
-##        sys.stderr = self.stderr
+##        sys.stdout = self.stdout          # __IGNORE_WARNING_M891__
+##        sys.stderr = self.stderr          # __IGNORE_WARNING_M891__
 
         # now fire up the single application server
         if Preferences.getUI("SingleApplicationMode"):
@@ -2475,8 +2475,6 @@
         ))
         self.webBrowserAct.triggered.connect(self.__startWebBrowser)
         self.actions.append(self.webBrowserAct)
-##        else:
-##            self.webBrowserAct = None
 
         self.iconEditorAct = E5Action(
             self.tr('Icon Editor'),
--- a/eric6/Utilities/ClassBrowsers/pyclbr.py	Wed Jan 13 19:02:30 2021 +0100
+++ b/eric6/Utilities/ClassBrowsers/pyclbr.py	Wed Jan 13 19:02:58 2021 +0100
@@ -636,7 +636,7 @@
             dictionary['__all__'] = pubs
         
         elif m.start("Import") >= 0:
-            ## import module
+            #- import module
             names = [n.strip() for n in
                      "".join(m.group("ImportList").splitlines())
                      .replace("\\", "").split(',')]
@@ -648,7 +648,7 @@
                 dictionary["@@Import@@"].addImport(name, [], lineno)
         
         elif m.start("ImportFrom") >= 0:
-            ## from module import stuff
+            #- from module import stuff
             mod = m.group("ImportFromPath")
             namesLines = (m.group("ImportFromList")
                           .replace("(", "").replace(")", "")
--- a/eric6/Utilities/ModuleParser.py	Wed Jan 13 19:02:30 2021 +0100
+++ b/eric6/Utilities/ModuleParser.py	Wed Jan 13 19:02:58 2021 +0100
@@ -801,7 +801,7 @@
                             break
 
             elif m.start("Import") >= 0:
-                ## import module
+                #- import module
                 names = [n.strip() for n in
                          "".join(m.group("ImportList").splitlines())
                          .replace("\\", "").split(',')]
@@ -810,7 +810,7 @@
                      if name not in self.imports])
             
             elif m.start("ImportFrom") >= 0:
-                ## from module import stuff
+                #- from module import stuff
                 mod = m.group("ImportFromPath")
                 namesLines = (m.group("ImportFromList")
                               .replace("(", "").replace(")", "")
--- a/eric6/WebBrowser/History/HistoryMenu.py	Wed Jan 13 19:02:30 2021 +0100
+++ b/eric6/WebBrowser/History/HistoryMenu.py	Wed Jan 13 19:02:58 2021 +0100
@@ -491,7 +491,6 @@
         
         self.setMaxRows(count + 1)
         
-##        self.activated.connect(self.__activated)
         self.setStatusBarTextRole(HistoryModel.UrlStringRole)
     
     def __activated(self, idx):

eric ide

mercurial