Fixed some code style issues. release-6.1.5

Mon, 27 Mar 2017 19:46:20 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 27 Mar 2017 19:46:20 +0200
changeset 60
971dd1b69f5b
parent 59
4915a31923dc
child 61
01b72bc93eed

Fixed some code style issues.

ChangeLog file | annotate | diff | comparison | revisions
PluginPyLint.e4p file | annotate | diff | comparison | revisions
PluginPyLint.py file | annotate | diff | comparison | revisions
PluginPyLint.zip file | annotate | diff | comparison | revisions
PyLint/Documentation/source/Plugin_Checker_PyLint.PluginPyLint.html file | annotate | diff | comparison | revisions
PyLint/Documentation/source/Plugin_Checker_PyLint.PyLint.PyLintConfigDialog.html file | annotate | diff | comparison | revisions
PyLint/PyLintConfigDialog.py file | annotate | diff | comparison | revisions
PyLint/PyLintExecDialog.py file | annotate | diff | comparison | revisions
--- a/ChangeLog	Sat Dec 31 13:50:22 2016 +0100
+++ b/ChangeLog	Mon Mar 27 19:46:20 2017 +0200
@@ -1,5 +1,8 @@
 ChangeLog
 ---------
+Version 6.1.5:
+- bug fixes
+
 Version 6.1.4:
 - bug fixes
 
--- a/PluginPyLint.e4p	Sat Dec 31 13:50:22 2016 +0100
+++ b/PluginPyLint.e4p	Mon Mar 27 19:46:20 2017 +0200
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE Project SYSTEM "Project-5.1.dtd">
 <!-- eric project file for project PluginPyLint -->
-<!-- Copyright (C) 2015 Detlev Offenbach, detlev@die-offenbachs.de -->
+<!-- Copyright (C) 2017 Detlev Offenbach, detlev@die-offenbachs.de -->
 <Project version="5.1">
   <Language>en_US</Language>
   <Hash>abcf6641287ab95ca3df062cd9840dd92df2e42f</Hash>
@@ -15,38 +15,38 @@
   <Eol index="1"/>
   <Sources>
     <Source>PluginPyLint.py</Source>
+    <Source>PyLint/PyLintConfigDialog.py</Source>
+    <Source>PyLint/PyLintExecDialog.py</Source>
+    <Source>PyLint/__init__.py</Source>
     <Source>__init__.py</Source>
-    <Source>PyLint/PyLintConfigDialog.py</Source>
-    <Source>PyLint/__init__.py</Source>
-    <Source>PyLint/PyLintExecDialog.py</Source>
   </Sources>
   <Forms>
     <Form>PyLint/PyLintConfigDialog.ui</Form>
     <Form>PyLint/PyLintExecDialog.ui</Form>
   </Forms>
   <Translations>
-    <Translation>PyLint/i18n/pylint_fr.ts</Translation>
-    <Translation>PyLint/i18n/pylint_ru.ts</Translation>
-    <Translation>PyLint/i18n/pylint_de.ts</Translation>
+    <Translation>PyLint/i18n/pylint_cs.qm</Translation>
     <Translation>PyLint/i18n/pylint_cs.ts</Translation>
-    <Translation>PyLint/i18n/pylint_es.ts</Translation>
     <Translation>PyLint/i18n/pylint_de.qm</Translation>
+    <Translation>PyLint/i18n/pylint_de.ts</Translation>
+    <Translation>PyLint/i18n/pylint_es.qm</Translation>
+    <Translation>PyLint/i18n/pylint_es.ts</Translation>
     <Translation>PyLint/i18n/pylint_fr.qm</Translation>
+    <Translation>PyLint/i18n/pylint_fr.ts</Translation>
+    <Translation>PyLint/i18n/pylint_pt.qm</Translation>
+    <Translation>PyLint/i18n/pylint_pt.ts</Translation>
     <Translation>PyLint/i18n/pylint_ru.qm</Translation>
-    <Translation>PyLint/i18n/pylint_cs.qm</Translation>
-    <Translation>PyLint/i18n/pylint_es.qm</Translation>
-    <Translation>PyLint/i18n/pylint_pt.ts</Translation>
-    <Translation>PyLint/i18n/pylint_pt.qm</Translation>
+    <Translation>PyLint/i18n/pylint_ru.ts</Translation>
   </Translations>
   <Resources/>
   <Interfaces/>
   <Others>
-    <Other>PluginPyLint.e4p</Other>
-    <Other>PKGLIST</Other>
+    <Other>.hgignore</Other>
     <Other>ChangeLog</Other>
+    <Other>PKGLIST</Other>
+    <Other>PluginPyLint.e4p</Other>
+    <Other>PluginPyLint.zip</Other>
     <Other>PyLint/Documentation/LICENSE.GPL3</Other>
-    <Other>.hgignore</Other>
-    <Other>PluginPyLint.zip</Other>
     <Other>PyLint/Documentation/source</Other>
   </Others>
   <MainScript>PluginPyLint.py</MainScript>
@@ -188,7 +188,7 @@
               <string>cssFile</string>
             </key>
             <value>
-              <string>%PYTHON%/eric5/CSSs/default.css</string>
+              <string>%PYTHON%/eric6/CSSs/default.css</string>
             </value>
             <key>
               <string>ignoreDirectories</string>
@@ -219,14 +219,6 @@
               <bool>False</bool>
             </value>
             <key>
-              <string>sourceExtensions</string>
-            </key>
-            <value>
-              <list>
-                <string></string>
-              </list>
-            </value>
-            <key>
               <string>useRecursion</string>
             </key>
             <value>
@@ -246,6 +238,49 @@
         <value>
           <dict>
             <key>
+              <string>BuiltinsChecker</string>
+            </key>
+            <value>
+              <dict>
+                <key>
+                  <string>bytes</string>
+                </key>
+                <value>
+                  <list>
+                    <string>unicode</string>
+                  </list>
+                </value>
+                <key>
+                  <string>chr</string>
+                </key>
+                <value>
+                  <list>
+                    <string>unichr</string>
+                  </list>
+                </value>
+                <key>
+                  <string>str</string>
+                </key>
+                <value>
+                  <list>
+                    <string>unicode</string>
+                  </list>
+                </value>
+              </dict>
+            </value>
+            <key>
+              <string>CopyrightAuthor</string>
+            </key>
+            <value>
+              <string></string>
+            </value>
+            <key>
+              <string>CopyrightMinFileSize</string>
+            </key>
+            <value>
+              <int>0</int>
+            </value>
+            <key>
               <string>DocstringType</string>
             </key>
             <value>
@@ -255,13 +290,13 @@
               <string>ExcludeFiles</string>
             </key>
             <value>
-              <string>*/Ui_*.py</string>
+              <string>*/Ui_*.py, */*_rc.py,</string>
             </value>
             <key>
               <string>ExcludeMessages</string>
             </key>
             <value>
-              <string>E24, W293, N802, N803, N807, N808, N821</string>
+              <string>C101, E265, E266, E305, E402, M811, N802, N803, N807, N808, N821, W293</string>
             </value>
             <key>
               <string>FixCodes</string>
@@ -276,6 +311,12 @@
               <bool>False</bool>
             </value>
             <key>
+              <string>FutureChecker</string>
+            </key>
+            <value>
+              <string>unicode_literals</string>
+            </value>
+            <key>
               <string>HangClosing</string>
             </key>
             <value>
@@ -288,6 +329,24 @@
               <string></string>
             </value>
             <key>
+              <string>LineComplexity</string>
+            </key>
+            <value>
+              <int>20</int>
+            </value>
+            <key>
+              <string>LineComplexityScore</string>
+            </key>
+            <value>
+              <int>10</int>
+            </value>
+            <key>
+              <string>MaxCodeComplexity</string>
+            </key>
+            <value>
+              <int>10</int>
+            </value>
+            <key>
               <string>MaxLineLength</string>
             </key>
             <value>
@@ -305,6 +364,18 @@
             <value>
               <bool>True</bool>
             </value>
+            <key>
+              <string>ShowIgnored</string>
+            </key>
+            <value>
+              <bool>False</bool>
+            </value>
+            <key>
+              <string>ValidEncodings</string>
+            </key>
+            <value>
+              <string>latin-1, utf-8</string>
+            </value>
           </dict>
         </value>
       </dict>
--- a/PluginPyLint.py	Sat Dec 31 13:50:22 2016 +0100
+++ b/PluginPyLint.py	Mon Mar 27 19:46:20 2017 +0200
@@ -19,7 +19,7 @@
 import platform
 
 from PyQt5.QtCore import QObject, QTranslator, QCoreApplication, QProcess
-from PyQt5.QtWidgets import  QDialog
+from PyQt5.QtWidgets import QDialog
 
 from E5Gui.E5Application import e5App
 from E5Gui.E5Action import E5Action
@@ -35,7 +35,7 @@
 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
 autoactivate = True
 deactivateable = True
-version = "6.1.4"
+version = "6.1.5"
 className = "PyLintPlugin"
 packageName = "PyLint"
 shortDescription = "Show the PyLint dialogs."
@@ -203,9 +203,9 @@
         # step 1: determine possible candidates
         exes = []
         dirs = path.split(os.pathsep)
-        for dir in dirs:
+        for directory in dirs:
             for suffix in scriptSuffixes:
-                exe = os.path.join(dir, pylintScript + suffix)
+                exe = os.path.join(directory, pylintScript + suffix)
                 if os.access(exe, os.X_OK):
                     exes.append(exe)
         
@@ -488,9 +488,9 @@
                 self.__projectBrowserShowAct.triggered.connect(
                     self.__projectBrowserPylintShow)
             
-            if not self.__projectBrowserAct in menu.actions():
+            if self.__projectBrowserAct not in menu.actions():
                 menu.addAction(self.__projectBrowserAct)
-            if not self.__projectBrowserShowAct in menu.actions():
+            if self.__projectBrowserShowAct not in menu.actions():
                 menu.addAction(self.__projectBrowserShowAct)
             
             enable = e5App().getObject("ProjectBrowser")\
@@ -556,7 +556,7 @@
     
     def __projectPylint(self):
         """
-        Public slot used to check the project files with Pylint.
+        Private slot used to check the project files with Pylint.
         """
         project = e5App().getObject("Project")
         project.saveAllScripts()
@@ -564,7 +564,8 @@
     
     def __projectPylintShow(self):
         """
-        Public slot to show the PyLint dialog with the results of the last run.
+        Private slot to show the PyLint dialog with the results of the last
+        run.
         """
         if self.__pylintPDialog is not None:
             self.__pylintPDialog.show()
@@ -586,7 +587,8 @@
     
     def __projectBrowserPylintShow(self):
         """
-        Public slot to show the PyLint dialog with the results of the last run.
+        Private slot to show the PyLint dialog with the results of the last
+        run.
         """
         if self.__pylintPsbDialog is not None:
             self.__pylintPsbDialog.show()
@@ -624,7 +626,7 @@
         @param editor reference to the editor (QScintilla.Editor)
         """
         if menuName == "Checks":
-            if not self.__editorAct in menu.actions():
+            if self.__editorAct not in menu.actions():
                 menu.addAction(self.__editorAct)
             self.__editorAct.setEnabled(
                 editor.isPy3File() or editor.isPy2File())
@@ -641,3 +643,6 @@
         fn = editor.getFileName()
         project = e5App().getObject("Project")
         self.__pyLint(project, fn, False, True)
+
+#
+# eflag: noqa = M801
Binary file PluginPyLint.zip has changed
--- a/PyLint/Documentation/source/Plugin_Checker_PyLint.PluginPyLint.html	Sat Dec 31 13:50:22 2016 +0100
+++ b/PyLint/Documentation/source/Plugin_Checker_PyLint.PluginPyLint.html	Mon Mar 27 19:46:20 2017 +0200
@@ -97,16 +97,16 @@
 <td>Private method to handle the Pylint context menu action of the project sources browser.</td>
 </tr><tr>
 <td><a href="#PyLintPlugin.__projectBrowserPylintShow">__projectBrowserPylintShow</a></td>
-<td>Public slot to show the PyLint dialog with the results of the last run.</td>
+<td>Private slot to show the PyLint dialog with the results of the last run.</td>
 </tr><tr>
 <td><a href="#PyLintPlugin.__projectBrowserShowMenu">__projectBrowserShowMenu</a></td>
 <td>Private slot called, when the the project browser menu or a submenu is about to be shown.</td>
 </tr><tr>
 <td><a href="#PyLintPlugin.__projectPylint">__projectPylint</a></td>
-<td>Public slot used to check the project files with Pylint.</td>
+<td>Private slot used to check the project files with Pylint.</td>
 </tr><tr>
 <td><a href="#PyLintPlugin.__projectPylintShow">__projectPylintShow</a></td>
-<td>Public slot to show the PyLint dialog with the results of the last run.</td>
+<td>Private slot to show the PyLint dialog with the results of the last run.</td>
 </tr><tr>
 <td><a href="#PyLintPlugin.__projectShowMenu">__projectShowMenu</a></td>
 <td>Private slot called, when the the project menu or a submenu is about to be shown.</td>
@@ -197,7 +197,8 @@
 <h4>PyLintPlugin.__projectBrowserPylintShow</h4>
 <b>__projectBrowserPylintShow</b>(<i></i>)
 <p>
-        Public slot to show the PyLint dialog with the results of the last run.
+        Private slot to show the PyLint dialog with the results of the last
+        run.
 </p><a NAME="PyLintPlugin.__projectBrowserShowMenu" ID="PyLintPlugin.__projectBrowserShowMenu"></a>
 <h4>PyLintPlugin.__projectBrowserShowMenu</h4>
 <b>__projectBrowserShowMenu</b>(<i>menuName, menu</i>)
@@ -216,12 +217,13 @@
 <h4>PyLintPlugin.__projectPylint</h4>
 <b>__projectPylint</b>(<i></i>)
 <p>
-        Public slot used to check the project files with Pylint.
+        Private slot used to check the project files with Pylint.
 </p><a NAME="PyLintPlugin.__projectPylintShow" ID="PyLintPlugin.__projectPylintShow"></a>
 <h4>PyLintPlugin.__projectPylintShow</h4>
 <b>__projectPylintShow</b>(<i></i>)
 <p>
-        Public slot to show the PyLint dialog with the results of the last run.
+        Private slot to show the PyLint dialog with the results of the last
+        run.
 </p><a NAME="PyLintPlugin.__projectShowMenu" ID="PyLintPlugin.__projectShowMenu"></a>
 <h4>PyLintPlugin.__projectShowMenu</h4>
 <b>__projectShowMenu</b>(<i>menuName, menu</i>)
--- a/PyLint/Documentation/source/Plugin_Checker_PyLint.PyLint.PyLintConfigDialog.html	Sat Dec 31 13:50:22 2016 +0100
+++ b/PyLint/Documentation/source/Plugin_Checker_PyLint.PyLint.PyLintConfigDialog.html	Mon Mar 27 19:46:20 2017 +0200
@@ -73,13 +73,13 @@
 <td>Private slot to handle the readyReadStandardOutput signal of the pylint process.</td>
 </tr><tr>
 <td><a href="#PyLintConfigDialog.accept">accept</a></td>
-<td>Protected slot called by the Ok button.</td>
+<td>Public slot called by the Ok button.</td>
 </tr><tr>
 <td><a href="#PyLintConfigDialog.generateParameters">generateParameters</a></td>
 <td>Public method that generates the commandline parameters.</td>
 </tr><tr>
 <td><a href="#PyLintConfigDialog.on_configButton_clicked">on_configButton_clicked</a></td>
-<td>Public slot to handle the generation of a sample configuration.</td>
+<td>Private slot to handle the generation of a sample configuration.</td>
 </tr><tr>
 <td><a href="#PyLintConfigDialog.on_configfileButton_clicked">on_configfileButton_clicked</a></td>
 <td>Private slot to select the configuration file.</td>
@@ -149,7 +149,7 @@
 <h4>PyLintConfigDialog.accept</h4>
 <b>accept</b>(<i></i>)
 <p>
-        Protected slot called by the Ok button.
+        Public slot called by the Ok button.
 </p><p>
         It saves the values in the parameters dictionary.
 </p><a NAME="PyLintConfigDialog.generateParameters" ID="PyLintConfigDialog.generateParameters"></a>
@@ -176,7 +176,7 @@
 <h4>PyLintConfigDialog.on_configButton_clicked</h4>
 <b>on_configButton_clicked</b>(<i></i>)
 <p>
-        Public slot to handle the generation of a sample configuration.
+        Private slot to handle the generation of a sample configuration.
 </p><a NAME="PyLintConfigDialog.on_configfileButton_clicked" ID="PyLintConfigDialog.on_configfileButton_clicked"></a>
 <h4>PyLintConfigDialog.on_configfileButton_clicked</h4>
 <b>on_configfileButton_clicked</b>(<i></i>)
--- a/PyLint/PyLintConfigDialog.py	Sat Dec 31 13:50:22 2016 +0100
+++ b/PyLint/PyLintConfigDialog.py	Mon Mar 27 19:46:20 2017 +0200
@@ -17,7 +17,7 @@
 import copy
 
 from PyQt5.QtCore import pyqtSlot, QProcess
-from PyQt5.QtWidgets import  QDialog
+from PyQt5.QtWidgets import QDialog
 
 from E5Gui.E5Application import e5App
 from E5Gui import E5FileDialog, E5MessageBox
@@ -249,7 +249,7 @@
             self.tr("Select configuration file"),
             startWith,
             self.tr("Configuration Files (*.cfg *.cnf *.rc);;"
-                        "All Files (*)"))
+                    "All Files (*)"))
         if config:
             self.configfileEdit.setText(Utilities.toNativeSeparators(config))
     
@@ -273,7 +273,7 @@
     
     def accept(self):
         """
-        Protected slot called by the Ok button.
+        Public slot called by the Ok button.
         
         It saves the values in the parameters dictionary.
         """
@@ -320,7 +320,7 @@
     @pyqtSlot()
     def on_configButton_clicked(self):
         """
-        Public slot to handle the generation of a sample configuration.
+        Private slot to handle the generation of a sample configuration.
         """
         self.buf = ""
         self.pylintProc = QProcess()
--- a/PyLint/PyLintExecDialog.py	Sat Dec 31 13:50:22 2016 +0100
+++ b/PyLint/PyLintExecDialog.py	Mon Mar 27 19:46:20 2017 +0200
@@ -389,7 +389,7 @@
             E5MessageBox.critical(
                 self, self.tr('PyLint Report'),
                 self.tr('<p>The PyLint report file <b>{0}</b> could not'
-                            ' be written.<br>Reason: {1}</p>')
+                        ' be written.<br>Reason: {1}</p>')
                 .format(self.reportFile, str(why)))
     
     @pyqtSlot()
@@ -398,15 +398,15 @@
         Private slot to save the report to a file.
         """
         if self.htmlOutput:
-            filter = self.tr("HTML Files (*.html);;All Files (*)")
+            fileFilter = self.tr("HTML Files (*.html);;All Files (*)")
         else:
-            filter = self.tr("Text Files (*.txt);;All Files (*)")
+            fileFilter = self.tr("Text Files (*.txt);;All Files (*)")
         
         self.reportFile = E5FileDialog.getSaveFileName(
             self,
             self.tr("PyLint Report"),
             self.ppath,
-            filter,
+            fileFilter,
             E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite))
         if self.reportFile:
             self.__writeReport()

eric ide

mercurial