Fixed some code style issues.

Mon, 22 Mar 2021 19:31:18 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 22 Mar 2021 19:31:18 +0100
changeset 8169
139bd30c52c2
parent 8168
bdb0258faf42
child 8170
fb77bff32621

Fixed some code style issues.

eric6/E5Gui/E5ErrorMessageFilterDialog.py file | annotate | diff | comparison | revisions
eric6/Plugins/CheckerPlugins/CodeStyleChecker/translations.py file | annotate | diff | comparison | revisions
eric6/QScintilla/Editor.py file | annotate | diff | comparison | revisions
eric6/QScintilla/Lexers/LexerPygments.py file | annotate | diff | comparison | revisions
eric6/QScintilla/MiniEditor.py file | annotate | diff | comparison | revisions
eric6/QScintilla/Shell.py file | annotate | diff | comparison | revisions
--- a/eric6/E5Gui/E5ErrorMessageFilterDialog.py	Mon Mar 22 19:22:11 2021 +0100
+++ b/eric6/E5Gui/E5ErrorMessageFilterDialog.py	Mon Mar 22 19:31:18 2021 +0100
@@ -7,7 +7,6 @@
 Module implementing a dialog to manage the list of messages to be ignored.
 """
 
-##from PyQt5.QtCore import pyqtSlot
 from PyQt5.QtWidgets import QDialog
 
 from .Ui_E5ErrorMessageFilterDialog import Ui_E5ErrorMessageFilterDialog
@@ -29,8 +28,6 @@
         super(E5ErrorMessageFilterDialog, self).__init__(parent)
         self.setupUi(self)
         
-##        self.__defaultFilters = defaultFilters[:]
-##        
         self.filtersEditWidget.setList(messageFilters)
         self.filtersEditWidget.setListWhatsThis(self.tr(
             "<b>Error Message Filters</b>"
@@ -39,16 +36,6 @@
             "<p>A default list of message filters is added to this"
             " user list.</p>"
         ))
-##        
-##        self.filtersEditWidget.setDefaultVisible(True)
-##        self.filtersEditWidget.setToDefault.connect(self.__setToDefault)
-##    
-##    @pyqtSlot()
-##    def __setToDefault(self):
-##        """
-##        Private slot to set the message list to the default values.
-##        """
-##        self.filtersEditWidget.setList(self.__defaultFilters)
     
     def getFilters(self):
         """
--- a/eric6/Plugins/CheckerPlugins/CodeStyleChecker/translations.py	Mon Mar 22 19:22:11 2021 +0100
+++ b/eric6/Plugins/CheckerPlugins/CodeStyleChecker/translations.py	Mon Mar 22 19:31:18 2021 +0100
@@ -522,6 +522,7 @@
 
 messageCategoryRe = re.compile(r"([A-Z]{1,3}).+")
 
+
 def getTranslatedMessage(messageCode, messageArgs, example=False):
     """
     Module function to get a translated and formatted message for a
@@ -570,14 +571,14 @@
                 pass
         except KeyError:
             pass
-        
-        if example:
-            return None
-        else:
-            return QCoreApplication.translate(
-                "CodeStyleChecker",
-                "No message defined for code '{0}'."
-            ).format(messageCode)
+    
+    if example:
+        return None
+    else:
+        return QCoreApplication.translate(
+            "CodeStyleChecker",
+            "No message defined for code '{0}'."
+        ).format(messageCode)
 
 
 def getMessageCodes():
--- a/eric6/QScintilla/Editor.py	Mon Mar 22 19:22:11 2021 +0100
+++ b/eric6/QScintilla/Editor.py	Mon Mar 22 19:31:18 2021 +0100
@@ -7730,6 +7730,7 @@
             line, index = self.getCursorPosition()
             text = self.text(line)[index - 1:index + 1]
             matchingPairs = ['()', '[]', '{}', '<>', "''", '""']
+            # __IGNORE_WARNING_M613__
             if text in matchingPairs:
                 self.delete()
         
--- a/eric6/QScintilla/Lexers/LexerPygments.py	Mon Mar 22 19:22:11 2021 +0100
+++ b/eric6/QScintilla/Lexers/LexerPygments.py	Mon Mar 22 19:31:18 2021 +0100
@@ -315,7 +315,7 @@
             PYGMENTS_BACKTICKSTRING: True,
         }
     
-    def readSettings(self, qs, prefix="/Scintilla" ):
+    def readSettings(self, qs, prefix="/Scintilla"):
         """
         Public method to read the lexer settings.
         
--- a/eric6/QScintilla/MiniEditor.py	Mon Mar 22 19:22:11 2021 +0100
+++ b/eric6/QScintilla/MiniEditor.py	Mon Mar 22 19:31:18 2021 +0100
@@ -90,6 +90,7 @@
             line, index = self.getCursorPosition()
             text = self.text(line)[index - 1:index + 1]
             matchingPairs = ['()', '[]', '{}', '<>', "''", '""']
+            # __IGNORE_WARNING_M613__
             if text in matchingPairs:
                 self.delete()
         
--- a/eric6/QScintilla/Shell.py	Mon Mar 22 19:22:11 2021 +0100
+++ b/eric6/QScintilla/Shell.py	Mon Mar 22 19:31:18 2021 +0100
@@ -1825,8 +1825,8 @@
                                     self.dbs.startClient(
                                         False,
                                         forProject=True,
-                                        workingDir=
-                                        self.__project.getProjectPath()
+                                        workingDir=self.__project
+                                        .getProjectPath()
                                     )
                                     self.__currentWorkingDirectory = (
                                         self.__project.getProjectPath()
@@ -1835,8 +1835,8 @@
                                     self.dbs.startClient(
                                         False,
                                         venvName=self.__currentVenv,
-                                        workingDir=
-                                        self.__currentWorkingDirectory
+                                        workingDir=self
+                                        .__currentWorkingDirectory
                                     )
                                     # same as reset
                             else:
@@ -2401,3 +2401,6 @@
         if Preferences.getProject("RestartShellForProject"):
             self.dbs.startClient(False)
             self.__getBanner()
+
+#
+# eflag: noqa = M601

eric ide

mercurial