Fixed some code style issues.

Mon, 11 Dec 2017 19:27:20 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 11 Dec 2017 19:27:20 +0100
changeset 6026
4773c9469880
parent 6025
9dfb5a421a56
child 6027
d056a536670e

Fixed some code style issues.

Documentation/Help/source.qch file | annotate | diff | comparison | revisions
Documentation/Source/eric6.Plugins.PluginTranslator.html file | annotate | diff | comparison | revisions
Documentation/Source/eric6.Plugins.UiExtensionPlugins.PipInterface.Pip.html file | annotate | diff | comparison | revisions
Plugins/PluginTranslator.py file | annotate | diff | comparison | revisions
Plugins/UiExtensionPlugins/PipInterface/Pip.py file | annotate | diff | comparison | revisions
Plugins/UiExtensionPlugins/Translator/TranslatorEngines/DeepLEngine.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsGit/GitSubmodulesDeinitDialog.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsGit/GitSubmodulesListDialog.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsGit/GitSubmodulesStatusDialog.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsGit/git.py file | annotate | diff | comparison | revisions
Plugins/WizardPlugins/DotDesktopWizard/DotDesktopWizardDialog.py file | annotate | diff | comparison | revisions
WebBrowser/WebBrowserTabWidget.py file | annotate | diff | comparison | revisions
WebBrowser/WebBrowserWindow.py file | annotate | diff | comparison | revisions
Binary file Documentation/Help/source.qch has changed
--- a/Documentation/Source/eric6.Plugins.PluginTranslator.html	Mon Dec 11 19:17:20 2017 +0100
+++ b/Documentation/Source/eric6.Plugins.PluginTranslator.html	Mon Dec 11 19:27:20 2017 +0100
@@ -31,7 +31,7 @@
 <table>
 <tr>
 <td><a href="#TranslatorPlugin">TranslatorPlugin</a></td>
-<td>Class implementing the Translator plugin.</td>
+<td>Class implementing the Translator plug-in.</td>
 </tr>
 </table>
 <h3>Functions</h3>
@@ -51,8 +51,14 @@
 <a NAME="TranslatorPlugin" ID="TranslatorPlugin"></a>
 <h2>TranslatorPlugin</h2>
 <p>
-    Class implementing the Translator plugin.
-</p>
+    Class implementing the Translator plug-in.
+</p><h3>Signals</h3>
+<dl>
+<dt>updateLanguages()</dt>
+<dd>
+emitted to indicate a languages update
+</dd>
+</dl>
 <h3>Derived from</h3>
 QObject
 <h3>Class Attributes</h3>
--- a/Documentation/Source/eric6.Plugins.UiExtensionPlugins.PipInterface.Pip.html	Mon Dec 11 19:17:20 2017 +0100
+++ b/Documentation/Source/eric6.Plugins.UiExtensionPlugins.PipInterface.Pip.html	Mon Dec 11 19:27:20 2017 +0100
@@ -112,7 +112,7 @@
 <td>Private slot to open the configuration page.</td>
 </tr><tr>
 <td><a href="#Pip.__repairPip">__repairPip</a></td>
-<td></td>
+<td>Private method to repair the pip installation.</td>
 </tr><tr>
 <td><a href="#Pip.__searchPyPI">__searchPyPI</a></td>
 <td>Private slot to search the Python Package Index.</td>
@@ -314,7 +314,19 @@
 </p><a NAME="Pip.__repairPip" ID="Pip.__repairPip"></a>
 <h4>Pip.__repairPip</h4>
 <b>__repairPip</b>(<i></i>)
-<a NAME="Pip.__searchPyPI" ID="Pip.__searchPyPI"></a>
+<p>
+        Private method to repair the pip installation.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+flag indicating a successful execution
+</dd>
+</dl><dl>
+<dt>Return Type:</dt>
+<dd>
+bool
+</dd>
+</dl><a NAME="Pip.__searchPyPI" ID="Pip.__searchPyPI"></a>
 <h4>Pip.__searchPyPI</h4>
 <b>__searchPyPI</b>(<i></i>)
 <p>
--- a/Plugins/PluginTranslator.py	Mon Dec 11 19:17:20 2017 +0100
+++ b/Plugins/PluginTranslator.py	Mon Dec 11 19:27:20 2017 +0100
@@ -81,7 +81,9 @@
 
 class TranslatorPlugin(QObject):
     """
-    Class implementing the Translator plugin.
+    Class implementing the Translator plug-in.
+    
+    @signal updateLanguages() emitted to indicate a languages update
     """
     PreferencesKey = "Translator"
     
--- a/Plugins/UiExtensionPlugins/PipInterface/Pip.py	Mon Dec 11 19:17:20 2017 +0100
+++ b/Plugins/UiExtensionPlugins/PipInterface/Pip.py	Mon Dec 11 19:27:20 2017 +0100
@@ -726,6 +726,12 @@
     
     @pyqtSlot()
     def __repairPip(self):
+        """
+        Private method to repair the pip installation.
+        
+        @return flag indicating a successful execution
+        @rtype bool
+        """
         default = self.tr("<Default>")
         pipExecutables = sorted(
             self.__plugin.getPreferences("PipExecutables"))
--- a/Plugins/UiExtensionPlugins/Translator/TranslatorEngines/DeepLEngine.py	Mon Dec 11 19:17:20 2017 +0100
+++ b/Plugins/UiExtensionPlugins/Translator/TranslatorEngines/DeepLEngine.py	Mon Dec 11 19:27:20 2017 +0100
@@ -58,7 +58,7 @@
         @return list of supported language codes
         @rtype list of str
         """
-        return ["de", "en", "es", "fr", "it", "nl", "pl",]
+        return ["de", "en", "es", "fr", "it", "nl", "pl", ]
     
     def getTranslation(self, requestObject, text, originalLanguage,
                        translationLanguage):
@@ -88,8 +88,9 @@
             "method": "LMT_handle_jobs",
             "id": 1,
             "params": {
-                "jobs": [{"kind": "default", "raw_en_sentence": s}
-                         for s in sentences
+                "jobs": [
+                    {"kind": "default", "raw_en_sentence": s}
+                    for s in sentences
                 ],
                 "lang": {
                     "user_preferred_langs": [
@@ -113,7 +114,7 @@
             
             if "error" in responseDict:
                 return self.tr("DeepL reported an error.\nMessage: {0}")\
-                    .format(responseDict["error"]["message"]),  False
+                    .format(responseDict["error"]["message"]), False
             
             if "result" not in responseDict:
                 return self.tr("DeepL call returned an unknown result"), False
@@ -134,9 +135,10 @@
             for translation in translations:
                 translationStrings.append(
                     "<br/>".join(
-                        [s["postprocessed_sentence"] for s in sorted(
-                            translation["beams"],
-                            key=lambda b: -1 * b["score"])
+                        [
+                            s["postprocessed_sentence"] for s in sorted(
+                                translation["beams"],
+                                key=lambda b: -1 * b["score"])
                         ]
                     )
                 )
--- a/Plugins/VcsPlugins/vcsGit/GitSubmodulesDeinitDialog.py	Mon Dec 11 19:17:20 2017 +0100
+++ b/Plugins/VcsPlugins/vcsGit/GitSubmodulesDeinitDialog.py	Mon Dec 11 19:27:20 2017 +0100
@@ -70,8 +70,8 @@
         @rtype tuple of (bool, list of str, bool)
         """
         submodulePaths = []
-        all = self.allCheckBox.isChecked()
-        if not all:
+        deinitAll = self.allCheckBox.isChecked()
+        if not deinitAll:
             for itm in self.submodulesList.selectedItems():
                 submodulePaths.append(itm.text())
         
--- a/Plugins/VcsPlugins/vcsGit/GitSubmodulesListDialog.py	Mon Dec 11 19:17:20 2017 +0100
+++ b/Plugins/VcsPlugins/vcsGit/GitSubmodulesListDialog.py	Mon Dec 11 19:27:20 2017 +0100
@@ -24,7 +24,7 @@
         Constructor
         
         @param submodules list of submodule data to be shown
-        @type list of dictionaries with submodule name, path, URL and branch 
+        @type list of dictionaries with submodule name, path, URL and branch
         @param parent reference to the parent widget
         @type QWidget
         """
--- a/Plugins/VcsPlugins/vcsGit/GitSubmodulesStatusDialog.py	Mon Dec 11 19:17:20 2017 +0100
+++ b/Plugins/VcsPlugins/vcsGit/GitSubmodulesStatusDialog.py	Mon Dec 11 19:27:20 2017 +0100
@@ -95,7 +95,7 @@
                 output = str(process.readAllStandardOutput(),
                              ioEncoding, 'replace')
                 error = str(process.readAllStandardError(),
-                             ioEncoding, 'replace')
+                            ioEncoding, 'replace')
                 if error:
                     self.errors.setText(error)
                     self.errorGroup.show()
--- a/Plugins/VcsPlugins/vcsGit/git.py	Mon Dec 11 19:17:20 2017 +0100
+++ b/Plugins/VcsPlugins/vcsGit/git.py	Mon Dec 11 19:27:20 2017 +0100
@@ -3909,10 +3909,10 @@
         from .GitSubmodulesDeinitDialog import GitSubmodulesDeinitDialog
         dlg = GitSubmodulesDeinitDialog(paths)
         if dlg.exec_() == QDialog.Accepted:
-            all, submodulePaths, force = dlg.getData()
+            deinitAll, submodulePaths, force = dlg.getData()
             args = self.initCommand("submodule")
             args.append("deinit")
-            if all:
+            if deinitAll:
                 args.append("--all")
             else:
                 args.extend(submodulePaths)
--- a/Plugins/WizardPlugins/DotDesktopWizard/DotDesktopWizardDialog.py	Mon Dec 11 19:17:20 2017 +0100
+++ b/Plugins/WizardPlugins/DotDesktopWizard/DotDesktopWizardDialog.py	Mon Dec 11 19:27:20 2017 +0100
@@ -79,7 +79,6 @@
             'Unity', 'XFCE', 'EDE', 'Cinnamon', 'Pantheon', 'Old',
         ]
         
-        
         self.typeComboBox.addItems([
             self.tr("FreeDesktop Standard .desktop"),
             self.tr("KDE Plasma MetaData .desktop"),
--- a/WebBrowser/WebBrowserTabWidget.py	Mon Dec 11 19:17:20 2017 +0100
+++ b/WebBrowser/WebBrowserTabWidget.py	Mon Dec 11 19:27:20 2017 +0100
@@ -186,12 +186,12 @@
             self.tr('Close All'), self.closeAllBrowsers)
         self.__tabContextMenu.addSeparator()
         if qVersionTuple() >= (5, 8, 0) or (
-            not Globals.isWindowsPlatform() and qVersionTuple() < (5, 7, 0)):
+           not Globals.isWindowsPlatform() and qVersionTuple() < (5, 7, 0)):
             self.__tabContextMenu.addAction(
                 UI.PixmapCache.getIcon("printPreview.png"),
                 self.tr('Print Preview'), self.__tabContextMenuPrintPreview)
         if qVersionTuple() >= (5, 8, 0) or (
-            not Globals.isWindowsPlatform() or qVersionTuple() >= (5, 7, 0)):
+           not Globals.isWindowsPlatform() or qVersionTuple() >= (5, 7, 0)):
             self.__tabContextMenu.addAction(
                 UI.PixmapCache.getIcon("print.png"),
                 self.tr('Print'), self.__tabContextMenuPrint)
--- a/WebBrowser/WebBrowserWindow.py	Mon Dec 11 19:17:20 2017 +0100
+++ b/WebBrowser/WebBrowserWindow.py	Mon Dec 11 19:27:20 2017 +0100
@@ -817,7 +817,7 @@
         self.__actions.append(self.exportBookmarksAct)
         
         if qVersionTuple() >= (5, 8, 0) or (
-            not Globals.isWindowsPlatform() or qVersionTuple() >= (5, 7, 0)):
+           not Globals.isWindowsPlatform() or qVersionTuple() >= (5, 7, 0)):
             self.printAct = E5Action(
                 self.tr('Print'),
                 UI.PixmapCache.getIcon("print.png"),
@@ -855,7 +855,7 @@
             self.printPdfAct = None
         
         if qVersionTuple() >= (5, 8, 0) or (
-            not Globals.isWindowsPlatform() and qVersionTuple() < (5, 7, 0)):
+           not Globals.isWindowsPlatform() and qVersionTuple() < (5, 7, 0)):
             self.printPreviewAct = E5Action(
                 self.tr('Print Preview'),
                 UI.PixmapCache.getIcon("printPreview.png"),

eric ide

mercurial