Removed some unused code detected by the vulture plug-in.

Fri, 09 Oct 2015 19:44:43 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 09 Oct 2015 19:44:43 +0200
changeset 4486
0538abbe71d0
parent 4485
28743e3251ce
child 4487
4ba7a8ab24f2

Removed some unused code detected by the vulture plug-in.

APIs/Python3/eric6.api file | annotate | diff | comparison | revisions
Documentation/Help/source.qch file | annotate | diff | comparison | revisions
Documentation/Help/source.qhp file | annotate | diff | comparison | revisions
Documentation/Source/eric6.Project.CreateDialogCodeDialog.html file | annotate | diff | comparison | revisions
Documentation/Source/eric6.Utilities.FtpUtilities.html file | annotate | diff | comparison | revisions
Documentation/Source/eric6.Utilities.ModuleParser.html file | annotate | diff | comparison | revisions
Documentation/Source/eric6.VCS.VersionControl.html file | annotate | diff | comparison | revisions
Utilities/FtpUtilities.py file | annotate | diff | comparison | revisions
Utilities/ModuleParser.py file | annotate | diff | comparison | revisions
VCS/CommandOptionsDialog.py file | annotate | diff | comparison | revisions
VCS/VersionControl.py file | annotate | diff | comparison | revisions
ViewManager/ViewManager.py file | annotate | diff | comparison | revisions
eric6.e4p file | annotate | diff | comparison | revisions
--- a/APIs/Python3/eric6.api	Fri Oct 09 18:39:28 2015 +0200
+++ b/APIs/Python3/eric6.api	Fri Oct 09 19:44:43 2015 +0200
@@ -6744,8 +6744,11 @@
 eric6.Project.CreateDialogCodeDialog.CreateDialogCodeDialog.on_filterEdit_textChanged?4(text)
 eric6.Project.CreateDialogCodeDialog.CreateDialogCodeDialog.on_newButton_clicked?4()
 eric6.Project.CreateDialogCodeDialog.CreateDialogCodeDialog?1(formName, project, parent=None)
+eric6.Project.CreateDialogCodeDialog.parameterNamesListRole?7
+eric6.Project.CreateDialogCodeDialog.parameterTypesListRole?7
 eric6.Project.CreateDialogCodeDialog.pyqtSignatureRole?7
 eric6.Project.CreateDialogCodeDialog.pythonSignatureRole?7
+eric6.Project.CreateDialogCodeDialog.returnTypeRole?7
 eric6.Project.CreateDialogCodeDialog.rubySignatureRole?7
 eric6.Project.DebuggerPropertiesDialog.DebuggerPropertiesDialog.on_debugClientButton_clicked?4()
 eric6.Project.DebuggerPropertiesDialog.DebuggerPropertiesDialog.on_interpreterButton_clicked?4()
@@ -8778,10 +8781,7 @@
 eric6.Utilities.ClassBrowsers.rbclbr.readmodule_ex?4(module, path=[])
 eric6.Utilities.ClassBrowsers.readmodule?4(module, path=[], isPyFile=False)
 eric6.Utilities.CodingError?1(coding)
-eric6.Utilities.FtpUtilities.FtpDirLineParser.MacMode?7
 eric6.Utilities.FtpUtilities.FtpDirLineParser.MonthnamesNumbers?7
-eric6.Utilities.FtpUtilities.FtpDirLineParser.UnixMode?7
-eric6.Utilities.FtpUtilities.FtpDirLineParser.WindowsMode?7
 eric6.Utilities.FtpUtilities.FtpDirLineParser.parseLine?4(line)
 eric6.Utilities.FtpUtilities.FtpDirLineParser?1(parent=None)
 eric6.Utilities.MimeTypes.isTextFile?4(filename)
@@ -8815,7 +8815,6 @@
 eric6.Utilities.ModuleParser.Module.getType?4()
 eric6.Utilities.ModuleParser.Module.scan?4(src)
 eric6.Utilities.ModuleParser.Module?1(name, file=None, type=None)
-eric6.Utilities.ModuleParser.PARSEABLE_TYPES?7
 eric6.Utilities.ModuleParser.PTL_SOURCE?7
 eric6.Utilities.ModuleParser.RB_SOURCE?7
 eric6.Utilities.ModuleParser.RbModule.addClass?4(name, _class)
@@ -9115,7 +9114,6 @@
 eric6.VCS.VersionControl.VersionControl.vcsCommandLine?4(name)
 eric6.VCS.VersionControl.VersionControl.vcsCommit?4(name, message, noDialog=False)
 eric6.VCS.VersionControl.VersionControl.vcsConvertProject?4(vcsDataDict, project)
-eric6.VCS.VersionControl.VersionControl.vcsDefaultOptions?4()
 eric6.VCS.VersionControl.VersionControl.vcsDiff?4(name)
 eric6.VCS.VersionControl.VersionControl.vcsExists?4()
 eric6.VCS.VersionControl.VersionControl.vcsExport?4(vcsDataDict, projectDir)
@@ -9123,7 +9121,6 @@
 eric6.VCS.VersionControl.VersionControl.vcsGetOtherData?4()
 eric6.VCS.VersionControl.VersionControl.vcsGetProjectBrowserHelper?4(browser, project, isTranslationsBrowser=False)
 eric6.VCS.VersionControl.VersionControl.vcsGetProjectHelper?4(project)
-eric6.VCS.VersionControl.VersionControl.vcsHistory?4(name)
 eric6.VCS.VersionControl.VersionControl.vcsImport?4(vcsDataDict, projectDir, noDialog=False)
 eric6.VCS.VersionControl.VersionControl.vcsInit?4(vcsDir, noDialog=False)
 eric6.VCS.VersionControl.VersionControl.vcsInitConfig?4(project)
Binary file Documentation/Help/source.qch has changed
--- a/Documentation/Help/source.qhp	Fri Oct 09 18:39:28 2015 +0200
+++ b/Documentation/Help/source.qhp	Fri Oct 09 19:44:43 2015 +0200
@@ -12823,7 +12823,6 @@
       <keyword name="VersionControl.vcsCommandLine" id="VersionControl.vcsCommandLine" ref="eric6.VCS.VersionControl.html#VersionControl.vcsCommandLine" />
       <keyword name="VersionControl.vcsCommit" id="VersionControl.vcsCommit" ref="eric6.VCS.VersionControl.html#VersionControl.vcsCommit" />
       <keyword name="VersionControl.vcsConvertProject" id="VersionControl.vcsConvertProject" ref="eric6.VCS.VersionControl.html#VersionControl.vcsConvertProject" />
-      <keyword name="VersionControl.vcsDefaultOptions" id="VersionControl.vcsDefaultOptions" ref="eric6.VCS.VersionControl.html#VersionControl.vcsDefaultOptions" />
       <keyword name="VersionControl.vcsDiff" id="VersionControl.vcsDiff" ref="eric6.VCS.VersionControl.html#VersionControl.vcsDiff" />
       <keyword name="VersionControl.vcsExists" id="VersionControl.vcsExists" ref="eric6.VCS.VersionControl.html#VersionControl.vcsExists" />
       <keyword name="VersionControl.vcsExport" id="VersionControl.vcsExport" ref="eric6.VCS.VersionControl.html#VersionControl.vcsExport" />
@@ -12831,7 +12830,6 @@
       <keyword name="VersionControl.vcsGetOtherData" id="VersionControl.vcsGetOtherData" ref="eric6.VCS.VersionControl.html#VersionControl.vcsGetOtherData" />
       <keyword name="VersionControl.vcsGetProjectBrowserHelper" id="VersionControl.vcsGetProjectBrowserHelper" ref="eric6.VCS.VersionControl.html#VersionControl.vcsGetProjectBrowserHelper" />
       <keyword name="VersionControl.vcsGetProjectHelper" id="VersionControl.vcsGetProjectHelper" ref="eric6.VCS.VersionControl.html#VersionControl.vcsGetProjectHelper" />
-      <keyword name="VersionControl.vcsHistory" id="VersionControl.vcsHistory" ref="eric6.VCS.VersionControl.html#VersionControl.vcsHistory" />
       <keyword name="VersionControl.vcsImport" id="VersionControl.vcsImport" ref="eric6.VCS.VersionControl.html#VersionControl.vcsImport" />
       <keyword name="VersionControl.vcsInit" id="VersionControl.vcsInit" ref="eric6.VCS.VersionControl.html#VersionControl.vcsInit" />
       <keyword name="VersionControl.vcsInitConfig" id="VersionControl.vcsInitConfig" ref="eric6.VCS.VersionControl.html#VersionControl.vcsInitConfig" />
--- a/Documentation/Source/eric6.Project.CreateDialogCodeDialog.html	Fri Oct 09 18:39:28 2015 +0200
+++ b/Documentation/Source/eric6.Project.CreateDialogCodeDialog.html	Fri Oct 09 19:44:43 2015 +0200
@@ -25,7 +25,7 @@
 </p>
 <h3>Global Attributes</h3>
 <table>
-<tr><td>pyqtSignatureRole</td></tr><tr><td>pythonSignatureRole</td></tr><tr><td>rubySignatureRole</td></tr>
+<tr><td>parameterNamesListRole</td></tr><tr><td>parameterTypesListRole</td></tr><tr><td>pyqtSignatureRole</td></tr><tr><td>pythonSignatureRole</td></tr><tr><td>returnTypeRole</td></tr><tr><td>rubySignatureRole</td></tr>
 </table>
 <h3>Classes</h3>
 <table>
--- a/Documentation/Source/eric6.Utilities.FtpUtilities.html	Fri Oct 09 18:39:28 2015 +0200
+++ b/Documentation/Source/eric6.Utilities.FtpUtilities.html	Fri Oct 09 19:44:43 2015 +0200
@@ -51,7 +51,7 @@
 QObject
 <h3>Class Attributes</h3>
 <table>
-<tr><td>MacMode</td></tr><tr><td>MonthnamesNumbers</td></tr><tr><td>UnixMode</td></tr><tr><td>WindowsMode</td></tr>
+<tr><td>MonthnamesNumbers</td></tr>
 </table>
 <h3>Class Methods</h3>
 <table>
--- a/Documentation/Source/eric6.Utilities.ModuleParser.html	Fri Oct 09 18:39:28 2015 +0200
+++ b/Documentation/Source/eric6.Utilities.ModuleParser.html	Fri Oct 09 19:44:43 2015 +0200
@@ -34,7 +34,7 @@
 </p>
 <h3>Global Attributes</h3>
 <table>
-<tr><td>PARSEABLE_TYPES</td></tr><tr><td>PTL_SOURCE</td></tr><tr><td>RB_SOURCE</td></tr><tr><td>SUPPORTED_TYPES</td></tr><tr><td>TABWIDTH</td></tr><tr><td>TYPE_MAPPING</td></tr><tr><td>__all__</td></tr><tr><td>_commentsub</td></tr><tr><td>_hashsub</td></tr><tr><td>_modules</td></tr><tr><td>_py_getnext</td></tr><tr><td>_rb_getnext</td></tr>
+<tr><td>PTL_SOURCE</td></tr><tr><td>RB_SOURCE</td></tr><tr><td>SUPPORTED_TYPES</td></tr><tr><td>TABWIDTH</td></tr><tr><td>TYPE_MAPPING</td></tr><tr><td>__all__</td></tr><tr><td>_commentsub</td></tr><tr><td>_hashsub</td></tr><tr><td>_modules</td></tr><tr><td>_py_getnext</td></tr><tr><td>_rb_getnext</td></tr>
 </table>
 <h3>Classes</h3>
 <table>
--- a/Documentation/Source/eric6.VCS.VersionControl.html	Fri Oct 09 18:39:28 2015 +0200
+++ b/Documentation/Source/eric6.VCS.VersionControl.html	Fri Oct 09 19:44:43 2015 +0200
@@ -154,9 +154,6 @@
 <td><a href="#VersionControl.vcsConvertProject">vcsConvertProject</a></td>
 <td>Public method to convert an uncontrolled project to a version controlled project.</td>
 </tr><tr>
-<td><a href="#VersionControl.vcsDefaultOptions">vcsDefaultOptions</a></td>
-<td>Public method used to retrieve the default options for the vcs.</td>
-</tr><tr>
 <td><a href="#VersionControl.vcsDiff">vcsDiff</a></td>
 <td>Public method used to view the diff of a file/directory in the vcs.</td>
 </tr><tr>
@@ -178,9 +175,6 @@
 <td><a href="#VersionControl.vcsGetProjectHelper">vcsGetProjectHelper</a></td>
 <td>Public method to instanciate a helper object for the project.</td>
 </tr><tr>
-<td><a href="#VersionControl.vcsHistory">vcsHistory</a></td>
-<td>Public method used to view the history of a file/directory in the vcs.</td>
-</tr><tr>
 <td><a href="#VersionControl.vcsImport">vcsImport</a></td>
 <td>Public method used to import the project into the vcs.</td>
 </tr><tr>
@@ -666,20 +660,6 @@
 to indicate that this method must be
             implemented by a subclass
 </dd>
-</dl><a NAME="VersionControl.vcsDefaultOptions" ID="VersionControl.vcsDefaultOptions"></a>
-<h4>VersionControl.vcsDefaultOptions</h4>
-<b>vcsDefaultOptions</b>(<i></i>)
-<p>
-        Public method used to retrieve the default options for the vcs.
-</p><dl>
-<dt>Returns:</dt>
-<dd>
-a dictionary with the vcs operations as key and
-            the respective options as values. The key 'global' must contain
-            the global options. The other keys must be 'commit', 'update',
-            'add', 'remove', 'diff', 'log', 'history', 'tag', 'status' and
-            'export'.
-</dd>
 </dl><a NAME="VersionControl.vcsDiff" ID="VersionControl.vcsDiff"></a>
 <h4>VersionControl.vcsDiff</h4>
 <b>vcsDiff</b>(<i>name</i>)
@@ -808,22 +788,6 @@
 to indicate that this method must be
             implemented by a subclass
 </dd>
-</dl><a NAME="VersionControl.vcsHistory" ID="VersionControl.vcsHistory"></a>
-<h4>VersionControl.vcsHistory</h4>
-<b>vcsHistory</b>(<i>name</i>)
-<p>
-        Public method used to view the history of a file/directory in the vcs.
-</p><dl>
-<dt><i>name</i></dt>
-<dd>
-file/directory name to show the history for (string)
-</dd>
-</dl><dl>
-<dt>Raises <b>RuntimeError</b>:</dt>
-<dd>
-to indicate that this method must be
-            implemented by a subclass
-</dd>
 </dl><a NAME="VersionControl.vcsImport" ID="VersionControl.vcsImport"></a>
 <h4>VersionControl.vcsImport</h4>
 <b>vcsImport</b>(<i>vcsDataDict, projectDir, noDialog=False</i>)
--- a/Utilities/FtpUtilities.py	Fri Oct 09 18:39:28 2015 +0200
+++ b/Utilities/FtpUtilities.py	Fri Oct 09 19:44:43 2015 +0200
@@ -42,10 +42,6 @@
         "dec": 12,
     }
     
-    UnixMode = 0
-    WindowsMode = 1
-    MacMode = 2
-    
     def __init__(self, parent=None):
         """
         Constructor
--- a/Utilities/ModuleParser.py	Fri Oct 09 18:39:28 2015 +0200
+++ b/Utilities/ModuleParser.py	Fri Oct 09 19:44:43 2015 +0200
@@ -36,7 +36,6 @@
 RB_SOURCE = 129
 
 SUPPORTED_TYPES = [imp.PY_SOURCE, PTL_SOURCE, RB_SOURCE]
-PARSEABLE_TYPES = ["Python", "Python2", "Python3", "Ruby"]
 TYPE_MAPPING = {
     "Python": imp.PY_SOURCE,
     "Python2": imp.PY_SOURCE,
--- a/VCS/CommandOptionsDialog.py	Fri Oct 09 18:39:28 2015 +0200
+++ b/VCS/CommandOptionsDialog.py	Fri Oct 09 19:44:43 2015 +0200
@@ -30,11 +30,6 @@
         super(VcsCommandOptionsDialog, self).__init__(parent)
         self.setupUi(self)
         
-        if Utilities.isWindowsPlatform():
-            self.optionChars = ['-', '/']
-        else:
-            self.optionChars = ['-']
-        
         opt = vcs.vcsGetOptions()
         self.globalEdit.setText(" ".join(opt['global']))
         self.commitEdit.setText(" ".join(opt['commit']))
--- a/VCS/VersionControl.py	Fri Oct 09 18:39:28 2015 +0200
+++ b/VCS/VersionControl.py	Fri Oct 09 19:44:43 2015 +0200
@@ -70,7 +70,6 @@
         self.options = {}
         self.otherData = {}
         self.canDetectBinaries = True
-        self.autoCommit = False
         
         self.statusMonitorThread = None
         self.vcsExecutionMutex = QMutex()
@@ -278,16 +277,6 @@
         """
         raise RuntimeError('Not implemented')
         
-    def vcsHistory(self, name):
-        """
-        Public method used to view the history of a file/directory in the vcs.
-        
-        @param name file/directory name to show the history for (string)
-        @exception RuntimeError to indicate that this method must be
-            implemented by a subclass
-        """
-        raise RuntimeError('Not implemented')
-        
     def vcsStatus(self, name):
         """
         Public method used to view the status of a file/directory in the vcs.
@@ -489,18 +478,6 @@
         """
         return True
     
-    def vcsDefaultOptions(self):
-        """
-        Public method used to retrieve the default options for the vcs.
-        
-        @return a dictionary with the vcs operations as key and
-            the respective options as values. The key 'global' must contain
-            the global options. The other keys must be 'commit', 'update',
-            'add', 'remove', 'diff', 'log', 'history', 'tag', 'status' and
-            'export'.
-        """
-        return self.defaultOptions
-        
     def vcsSetOptions(self, options):
         """
         Public method used to set the options for the vcs.
--- a/ViewManager/ViewManager.py	Fri Oct 09 18:39:28 2015 +0200
+++ b/ViewManager/ViewManager.py	Fri Oct 09 19:44:43 2015 +0200
@@ -3230,10 +3230,6 @@
         self.quickFindtextCombo.setInsertPolicy(QComboBox.InsertAtTop)
         self.quickFindtextCombo.lastActive = None
         self.quickFindtextCombo.lastCursorPos = None
-        self.quickFindtextCombo.leForegroundColor = \
-            self.quickFindtextCombo.lineEdit().palette().color(QPalette.Text)
-        self.quickFindtextCombo.leBackgroundColor = \
-            self.quickFindtextCombo.lineEdit().palette().color(QPalette.Base)
         self.quickFindtextCombo.lastSearchText = ""
         self.quickFindtextCombo._editor = self.quickFindtextCombo.lineEdit()
         # this allows us not to jump across searched text
--- a/eric6.e4p	Fri Oct 09 18:39:28 2015 +0200
+++ b/eric6.e4p	Fri Oct 09 19:44:43 2015 +0200
@@ -2232,6 +2232,91 @@
             </value>
           </dict>
         </value>
+        <key>
+          <string>Vulture</string>
+        </key>
+        <value>
+          <dict>
+            <key>
+              <string>ExcludeFiles</string>
+            </key>
+            <value>
+              <string>*/ThirdParty/*, */coverage/*, Ui_*.py</string>
+            </value>
+            <key>
+              <string>SlotsAreUsed</string>
+            </key>
+            <value>
+              <bool>True</bool>
+            </value>
+            <key>
+              <string>WhiteLists</string>
+            </key>
+            <value>
+              <dict>
+                <key>
+                  <string>__patterns__</string>
+                </key>
+                <value>
+                  <list>
+                    <string>visit_*</string>
+                    <string>on_*</string>
+                    <string>*Completer</string>
+                    <string>visit*</string>
+                  </list>
+                </value>
+                <key>
+                  <string>attribute</string>
+                </key>
+                <value>
+                  <list/>
+                </value>
+                <key>
+                  <string>class</string>
+                </key>
+                <value>
+                  <list/>
+                </value>
+                <key>
+                  <string>function</string>
+                </key>
+                <value>
+                  <list>
+                    <string>getOpenEditorsCount</string>
+                    <string>_vcsRemove</string>
+                    <string>getType</string>
+                    <string>getImport</string>
+                    <string>readPlistFromBytes</string>
+                    <string>vcsSetData</string>
+                    <string>_getglobal</string>
+                  </list>
+                </value>
+                <key>
+                  <string>property</string>
+                </key>
+                <value>
+                  <list/>
+                </value>
+                <key>
+                  <string>slot</string>
+                </key>
+                <value>
+                  <list/>
+                </value>
+                <key>
+                  <string>variable</string>
+                </key>
+                <value>
+                  <list>
+                    <string>Complexity_Weak</string>
+                    <string>Complexity_Good</string>
+                    <string>Complexity_Strong</string>
+                  </list>
+                </value>
+              </dict>
+            </value>
+          </dict>
+        </value>
       </dict>
     </CheckersParams>
   </Checkers>

eric ide

mercurial