Continued to resolve code style issue M841.

Tue, 24 Sep 2019 19:08:10 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 24 Sep 2019 19:08:10 +0200
changeset 7264
bedbe458d792
parent 7263
c1af2e327675
child 7265
0665c4d509c9

Continued to resolve code style issue M841.

eric6/UI/Browser.py file | annotate | diff | comparison | revisions
eric6/UI/BrowserModel.py file | annotate | diff | comparison | revisions
eric6/UI/CodeDocumentationViewer.py file | annotate | diff | comparison | revisions
eric6/UI/CodeDocumentationViewerTemplate.py file | annotate | diff | comparison | revisions
eric6/UI/CompareDialog.py file | annotate | diff | comparison | revisions
eric6/UI/DiffDialog.py file | annotate | diff | comparison | revisions
eric6/UI/EmailDialog.py file | annotate | diff | comparison | revisions
eric6/UI/ErrorLogDialog.py file | annotate | diff | comparison | revisions
eric6/UI/FindFileDialog.py file | annotate | diff | comparison | revisions
eric6/UI/FindFileNameDialog.py file | annotate | diff | comparison | revisions
eric6/UI/Info.py file | annotate | diff | comparison | revisions
eric6/UI/LogView.py file | annotate | diff | comparison | revisions
eric6/UI/NotificationWidget.py file | annotate | diff | comparison | revisions
eric6/UI/Previewer.py file | annotate | diff | comparison | revisions
eric6/UI/Previewers/PreviewerHTML.py file | annotate | diff | comparison | revisions
eric6/UI/Previewers/PreviewerQSS.py file | annotate | diff | comparison | revisions
eric6/UI/PythonAstViewer.py file | annotate | diff | comparison | revisions
eric6/UI/SymbolsWidget.py file | annotate | diff | comparison | revisions
eric6/UI/UserInterface.py file | annotate | diff | comparison | revisions
--- a/eric6/UI/Browser.py	Tue Sep 24 18:46:24 2019 +0200
+++ b/eric6/UI/Browser.py	Tue Sep 24 19:08:10 2019 +0200
@@ -10,8 +10,10 @@
 
 import os
 
-from PyQt5.QtCore import QModelIndex, pyqtSignal, QUrl, Qt, QCoreApplication, \
-    QItemSelectionModel, QElapsedTimer
+from PyQt5.QtCore import (
+    QModelIndex, pyqtSignal, QUrl, Qt, QCoreApplication, QItemSelectionModel,
+    QElapsedTimer
+)
 from PyQt5.QtGui import QDesktopServices
 from PyQt5.QtWidgets import QTreeView, QApplication, QMenu, QAbstractItemView
 
@@ -19,10 +21,11 @@
 from E5Gui import E5FileDialog, E5MessageBox
 
 from Project.ProjectBrowserModel import ProjectBrowserSimpleDirectoryItem
-from .BrowserModel import BrowserModel, BrowserDirectoryItem, \
-    BrowserFileItem, BrowserClassItem, BrowserMethodItem, \
-    BrowserClassAttributeItem, BrowserImportItem, BrowserImportsItem, \
-    BrowserSysPathItem, BrowserGlobalsItem
+from .BrowserModel import (
+    BrowserModel, BrowserDirectoryItem, BrowserFileItem, BrowserClassItem,
+    BrowserMethodItem, BrowserClassAttributeItem, BrowserImportItem,
+    BrowserImportsItem, BrowserSysPathItem, BrowserGlobalsItem
+)
 from .BrowserSortFilterProxyModel import BrowserSortFilterProxyModel
 
 import UI.PixmapCache
@@ -343,9 +346,10 @@
                     else:
                         self.editPixmapAct.setVisible(itm.isPixmapFile())
                         self.menu.popup(coord)
-                elif isinstance(itm, BrowserClassItem) or \
-                    isinstance(itm, BrowserMethodItem) or \
-                        isinstance(itm, BrowserImportItem):
+                elif isinstance(
+                    itm,
+                    (BrowserClassItem, BrowserMethodItem, BrowserImportItem)
+                ):
                     self.editPixmapAct.setVisible(False)
                     self.menu.popup(coord)
                 elif isinstance(itm, BrowserClassAttributeItem):
@@ -605,8 +609,8 @@
         index = self.currentIndex()
         searchDir = self.model().item(index).dirName()
         
-        e5App().getObject("UserInterface")\
-            .showFindFilesDialog(searchDir=searchDir)
+        e5App().getObject("UserInterface").showFindFilesDialog(
+            searchDir=searchDir)
         
     def __replaceInDirectory(self):
         """
@@ -615,8 +619,8 @@
         index = self.currentIndex()
         searchDir = self.model().item(index).dirName()
         
-        e5App().getObject("UserInterface")\
-            .showReplaceFilesDialog(searchDir=searchDir)
+        e5App().getObject("UserInterface").showReplaceFilesDialog(
+            searchDir=searchDir)
         
     def handleProgramChange(self, fn):
         """
@@ -734,9 +738,12 @@
         
         keyboardSearchTimeWasValid = self._keyboardSearchTimer.isValid()
         keyboardSearchTimeElapsed = self._keyboardSearchTimer.restart()
-        if not search or not keyboardSearchTimeWasValid or \
-            keyboardSearchTimeElapsed > \
-                QApplication.keyboardInputInterval():
+        if (
+            not search or
+            not keyboardSearchTimeWasValid or
+            keyboardSearchTimeElapsed >
+                QApplication.keyboardInputInterval()
+        ):
             self._keyboardSearchString = search.lower()
         else:
             self._keyboardSearchString += search.lower()
@@ -745,8 +752,10 @@
         found = False
         while True:
             name = self.model().data(index)
-            if name.lower().startswith(self._keyboardSearchString) and \
-                    self._keyboardSearchType(self.model().item(index)):
+            if (
+                name.lower().startswith(self._keyboardSearchString) and
+                self._keyboardSearchType(self.model().item(index))
+            ):
                 found = True
                 break
             
--- a/eric6/UI/BrowserModel.py	Tue Sep 24 18:46:24 2019 +0200
+++ b/eric6/UI/BrowserModel.py	Tue Sep 24 19:08:10 2019 +0200
@@ -12,8 +12,10 @@
 import fnmatch
 import json
 
-from PyQt5.QtCore import QDir, QModelIndex, QAbstractItemModel, \
-    QFileSystemWatcher, Qt, QProcess, QCoreApplication
+from PyQt5.QtCore import (
+    QDir, QModelIndex, QAbstractItemModel, QFileSystemWatcher, Qt, QProcess,
+    QCoreApplication
+)
 from PyQt5.QtGui import QImageReader, QFont
 from PyQt5.QtWidgets import QApplication
 
@@ -94,8 +96,10 @@
             item = index.internalPointer()
             if index.column() < item.columnCount():
                 return item.data(index.column())
-            elif index.column() == item.columnCount() and \
-                    index.column() < self.columnCount(self.parent(index)):
+            elif (
+                index.column() == item.columnCount() and
+                index.column() < self.columnCount(self.parent(index))
+            ):
                 # This is for the case where an item under a multi-column
                 # parent doesn't have a value for all the columns
                 return ""
@@ -155,8 +159,12 @@
         # The model/view framework considers negative values out-of-bounds,
         # however in python they work when indexing into lists. So make sure
         # we return an invalid index for out-of-bounds row/col
-        if row < 0 or column < 0 or \
-           row >= self.rowCount(parent) or column >= self.columnCount(parent):
+        if (
+            row < 0 or
+            column < 0 or
+            row >= self.rowCount(parent) or
+            column >= self.columnCount(parent)
+        ):
             return QModelIndex()
         
         if not parent.isValid():
@@ -269,9 +277,11 @@
         """
         if isinstance(itm, BrowserDirectoryItem):
             dirName = itm.dirName()
-            if dirName != "" and \
-               not dirName.startswith("//") and \
-               not dirName.startswith("\\\\"):
+            if (
+                dirName != "" and
+                not dirName.startswith("//") and
+                not dirName.startswith("\\\\")
+            ):
                 if dirName not in self.watcher.directories():
                     self.watcher.addPath(dirName)
                 if dirName in self.watchedItems:
@@ -559,8 +569,8 @@
                         Utilities.toNativeSeparators(f.absoluteFilePath()),
                         False)
                 else:
-                    fileFilters = \
-                        Preferences.getUI("BrowsersFileFilters").split(";")
+                    fileFilters = Preferences.getUI(
+                        "BrowsersFileFilters").split(";")
                     if fileFilters:
                         fn = f.fileName()
                         if any(fnmatch.fnmatch(fn, ff.strip())
@@ -658,16 +668,18 @@
                     QCoreApplication.translate("BrowserModel", "Imports"))
                 self._addItem(node, parentItem)
                 if "@@Import@@" in keys:
-                    for importedModule in \
-                            dictionary["@@Import@@"].getImports().values():
+                    for importedModule in (
+                        dictionary["@@Import@@"].getImports().values()
+                    ):
                         m_node = BrowserImportItem(
                             node,
                             importedModule.importedModuleName,
                             importedModule.file,
                             importedModule.linenos)
                         self._addItem(m_node, node)
-                        for importedName, linenos in \
-                                importedModule.importedNames.items():
+                        for importedName, linenos in (
+                            importedModule.importedNames.items()
+                        ):
                             mn_node = BrowserImportItem(
                                 m_node,
                                 importedName,
@@ -987,8 +999,11 @@
         BrowserItem.__init__(self, parent, dn)
         
         self.type_ = BrowserItemDirectory
-        if not Utilities.isDrive(self._dirName) and \
-           os.path.lexists(self._dirName) and os.path.islink(self._dirName):
+        if (
+            not Utilities.isDrive(self._dirName) and
+            os.path.lexists(self._dirName) and
+            os.path.islink(self._dirName)
+        ):
             self.symlink = True
             self.icon = UI.PixmapCache.getSymlinkIcon("dirClosed.png")
         else:
@@ -1163,9 +1178,13 @@
         """
         self._filename = os.path.abspath(finfo)
         self.itemData[0] = os.path.basename(finfo)
-        if self.isPython2File() or self.isPython3File() or \
-           self.isRubyFile() or self.isIdlFile() or \
-           self.isProtobufFile():
+        if (
+            self.isPython2File() or
+            self.isPython3File() or
+            self.isRubyFile() or
+            self.isIdlFile() or
+            self.isProtobufFile()
+        ):
             self._dirName = os.path.dirname(finfo)
             self._moduleName = os.path.basename(finfo)
     
@@ -1215,9 +1234,11 @@
         
         @return flag indicating a Python file (boolean)
         """
-        return self.fileext in Preferences.getPython("PythonExtensions") or \
+        return (
+            self.fileext in Preferences.getPython("PythonExtensions") or
             (self.fileext == "" and
              self.sourceLanguage in ["Python", "Python2"])
+        )
     
     def isPython3File(self):
         """
@@ -1225,8 +1246,10 @@
         
         @return flag indicating a Python file (boolean)
         """
-        return self.fileext in Preferences.getPython("Python3Extensions") or \
+        return (
+            self.fileext in Preferences.getPython("Python3Extensions") or
             (self.fileext == "" and self.sourceLanguage == "Python3")
+        )
     
     def isRubyFile(self):
         """
@@ -1234,8 +1257,10 @@
         
         @return flag indicating a Ruby file (boolean)
         """
-        return self.fileext == '.rb' or \
+        return (
+            self.fileext == '.rb' or
             (self.fileext == "" and self.sourceLanguage == "Ruby")
+        )
     
     def isDesignerFile(self):
         """
@@ -1324,8 +1349,10 @@
         
         @return flag indicating a D file (boolean)
         """
-        return self.fileext in ['.d', '.di'] or \
+        return (
+            self.fileext in ['.d', '.di'] or
             (self.fileext == "" and self.sourceLanguage == "D")
+        )
     
     def lessThan(self, other, column, order):
         """
@@ -1342,8 +1369,8 @@
         
         if issubclass(other.__class__, BrowserFileItem):
             sinit = os.path.basename(self._filename).startswith('__init__.py')
-            oinit = \
-                os.path.basename(other.fileName()).startswith('__init__.py')
+            oinit = os.path.basename(other.fileName()).startswith(
+                '__init__.py')
             if sinit and not oinit:
                 return order == Qt.AscendingOrder
             if not sinit and oinit:
@@ -1421,10 +1448,12 @@
                 self.icon = UI.PixmapCache.getIcon("class_protected.png")
             else:
                 self.icon = UI.PixmapCache.getIcon("class.png")
-        if self._classObject and \
-           (self._classObject.methods or
-            self._classObject.classes or
-                self._classObject.attributes):
+        if (
+            self._classObject and
+            (self._classObject.methods or
+             self._classObject.classes or
+             self._classObject.attributes)
+        ):
             self._populated = False
             self._lazyPopulation = True
     
@@ -1477,12 +1506,16 @@
         @param order sort order (Qt.SortOrder) (for special sorting)
         @return true, if this item is less than other (boolean)
         """
-        if issubclass(other.__class__, BrowserCodingItem) or \
-           issubclass(other.__class__, BrowserClassAttributesItem):
+        if issubclass(
+            other.__class__,
+            (BrowserCodingItem, BrowserClassAttributesItem)
+        ):
             return order == Qt.DescendingOrder
         
-        if Preferences.getUI("BrowsersListContentsByOccurrence") and \
-                column == 0:
+        if (
+            Preferences.getUI("BrowsersListContentsByOccurrence") and
+            column == 0
+        ):
             if order == Qt.AscendingOrder:
                 return self.lineno() < other.lineno()
             else:
@@ -1519,11 +1552,15 @@
         self._name = name
         self._functionObject = fn
         self._filename = filename
-        if self._functionObject.modifier == \
-           Utilities.ClassBrowsers.ClbrBaseClasses.Function.Static:
+        if (
+            self._functionObject.modifier ==
+            Utilities.ClassBrowsers.ClbrBaseClasses.Function.Static
+        ):
             self.icon = UI.PixmapCache.getIcon("method_static.png")
-        elif self._functionObject.modifier == \
-                Utilities.ClassBrowsers.ClbrBaseClasses.Function.Class:
+        elif (
+            self._functionObject.modifier ==
+            Utilities.ClassBrowsers.ClbrBaseClasses.Function.Class
+        ):
             self.icon = UI.PixmapCache.getIcon("method_class.png")
         elif self._functionObject.isPrivate():
             self.icon = UI.PixmapCache.getIcon("method_private.png")
@@ -1540,8 +1577,10 @@
         # ....format(name,
         #            ", ".join([e.split('=')[0].strip()
         #                       for e in self._functionObject.parameters]))
-        if self._functionObject and \
-           (self._functionObject.methods or self._functionObject.classes):
+        if (
+            self._functionObject and
+            (self._functionObject.methods or self._functionObject.classes)
+        ):
             self._populated = False
             self._lazyPopulation = True
     
@@ -1602,8 +1641,10 @@
         elif issubclass(other.__class__, BrowserClassAttributesItem):
             return order == Qt.DescendingOrder
         
-        if Preferences.getUI("BrowsersListContentsByOccurrence") and \
-                column == 0:
+        if (
+            Preferences.getUI("BrowsersListContentsByOccurrence") and
+            column == 0
+        ):
             if order == Qt.AscendingOrder:
                 return self.lineno() < other.lineno()
             else:
@@ -1680,8 +1721,10 @@
         """
         if issubclass(other.__class__, BrowserCodingItem):
             return order == Qt.DescendingOrder
-        elif issubclass(other.__class__, BrowserClassItem) or \
-                issubclass(other.__class__, BrowserMethodItem):
+        elif issubclass(
+            other.__class__,
+            (BrowserClassItem, BrowserMethodItem)
+        ):
             return order == Qt.AscendingOrder
         
         return BrowserItem.lessThan(self, other, column, order)
@@ -1762,8 +1805,10 @@
         @param order sort order (Qt.SortOrder) (for special sorting)
         @return true, if this item is less than other (boolean)
         """
-        if Preferences.getUI("BrowsersListContentsByOccurrence") and \
-                column == 0:
+        if (
+            Preferences.getUI("BrowsersListContentsByOccurrence") and
+            column == 0
+        ):
             if order == Qt.AscendingOrder:
                 return self.lineno() < other.lineno()
             else:
@@ -1812,9 +1857,10 @@
         @param order sort order (Qt.SortOrder) (for special sorting)
         @return true, if this item is less than other (boolean)
         """
-        if issubclass(other.__class__, BrowserClassItem) or \
-           issubclass(other.__class__, BrowserClassAttributesItem) or \
-           issubclass(other.__class__, BrowserImportItem):
+        if issubclass(
+            other.__class__,
+            (BrowserClassItem, BrowserClassAttributesItem, BrowserImportItem)
+        ):
             return order == Qt.AscendingOrder
         
         return BrowserItem.lessThan(self, other, column, order)
@@ -1845,8 +1891,10 @@
         @param order sort order (Qt.SortOrder) (for special sorting)
         @return true, if this item is less than other (boolean)
         """
-        if issubclass(other.__class__, BrowserClassItem) or \
-           issubclass(other.__class__, BrowserClassAttributesItem):
+        if issubclass(
+            other.__class__,
+            (BrowserClassItem, BrowserClassAttributesItem)
+        ):
             return order == Qt.AscendingOrder
         
         return BrowserItem.lessThan(self, other, column, order)
@@ -1912,8 +1960,10 @@
         @param order sort order (Qt.SortOrder) (for special sorting)
         @return true, if this item is less than other (boolean)
         """
-        if Preferences.getUI("BrowsersListContentsByOccurrence") and \
-                column == 0:
+        if (
+            Preferences.getUI("BrowsersListContentsByOccurrence") and
+            column == 0
+        ):
             if order == Qt.AscendingOrder:
                 return self.lineno() < other.lineno()
             else:
--- a/eric6/UI/CodeDocumentationViewer.py	Tue Sep 24 18:46:24 2019 +0200
+++ b/eric6/UI/CodeDocumentationViewer.py	Tue Sep 24 19:08:10 2019 +0200
@@ -11,17 +11,20 @@
 
 from PyQt5.QtCore import pyqtSlot, pyqtSignal, Qt, QUrl, QTimer
 from PyQt5.QtGui import QCursor
-from PyQt5.QtWidgets import QWidget, QVBoxLayout, QHBoxLayout, QLabel, \
-    QComboBox, QSizePolicy, QLineEdit, QTextBrowser, QToolTip
+from PyQt5.QtWidgets import (
+    QWidget, QVBoxLayout, QHBoxLayout, QLabel, QComboBox, QSizePolicy,
+    QLineEdit, QTextBrowser, QToolTip
+)
 
 from E5Gui.E5TextEditSearchWidget import E5TextEditSearchWidget
 
 import Preferences
 
-from .CodeDocumentationViewerTemplate import \
-    prepareDocumentationViewerHtmlDocument, \
-    prepareDocumentationViewerHtmlDocWarningDocument, \
+from .CodeDocumentationViewerTemplate import (
+    prepareDocumentationViewerHtmlDocument,
+    prepareDocumentationViewerHtmlDocWarningDocument,
     prepareDocumentationViewerHtmlWarningDocument
+)
 
 from .data import codeDocumentationViewer_rc    # __IGNORE_WARNING__
 
@@ -46,8 +49,9 @@
         self.__verticalLayout.setContentsMargins(0, 0, 0, 0)
         
         try:
-            from PyQt5.QtWebEngineWidgets import QWebEngineView, \
-                QWebEngineSettings
+            from PyQt5.QtWebEngineWidgets import (
+                QWebEngineView, QWebEngineSettings
+            )
             self.__contents = QWebEngineView(self)
             self.__contents.page().linkHovered.connect(self.__showLink)
             try:
--- a/eric6/UI/CodeDocumentationViewerTemplate.py	Tue Sep 24 18:46:24 2019 +0200
+++ b/eric6/UI/CodeDocumentationViewerTemplate.py	Tue Sep 24 19:08:10 2019 +0200
@@ -86,13 +86,17 @@
                     char,
                     '<span class="argspec-highlight">{0}</span>'.format(
                         char))
-            argspec = argspecTemplate\
-                .replace("@NAME@", name)\
+            argspec = (
+                argspecTemplate
+                .replace("@NAME@", name)
                 .replace("@ARGSPEC@", argspec)
+            )
         else:
-            argspec = argspecTemplate\
-                .replace("@NAME@", name)\
+            argspec = (
+                argspecTemplate
+                .replace("@NAME@", name)
                 .replace("@ARGSPEC@", "")
+            )
         
         if "typ" in documentationInfo and documentationInfo["typ"]:
             typeInfo = typeTemplate.replace("@TYPE@",
@@ -106,33 +110,42 @@
         else:
             note = ""
         
-        metaData = metadataTemplate\
-            .replace("@ARGSPEC@", argspec)\
-            .replace("@TYPE@", typeInfo)\
+        metaData = (
+            metadataTemplate
+            .replace("@ARGSPEC@", argspec)
+            .replace("@TYPE@", typeInfo)
             .replace("@NOTE@", note)
+        )
         
-        header = headerTemplate\
-            .replace("@TITLE@", title)\
+        header = (
+            headerTemplate
+            .replace("@TITLE@", title)
             .replace("@METADATA@", metaData)
+        )
     else:
         header = ""
     
     if "docstring" in documentationInfo and documentationInfo["docstring"]:
-        docstring = documentationInfo["docstring"]\
-            .replace("\r\n", "<br/>")\
-            .replace("\n", "<br/>")\
+        docstring = (
+            documentationInfo["docstring"]
+            .replace("\r\n", "<br/>")
+            .replace("\n", "<br/>")
             .replace("\r", "<br/>")
+        )
         docstring = docstringTemplate.replace("@DOCSTRING@", docstring)
     else:
-        docstring = \
-            """<div class="hr"></div><div id="doc-warning">{0}</div>"""\
+        docstring = (
+            """<div class="hr"></div><div id="doc-warning">{0}</div>"""
             .format(QCoreApplication.translate(
                 "CodeDocumentationViewer",
                 "No further documentation available"))
+        )
     
-    return mainTemplate\
-        .replace("@HEADER@", header)\
+    return (
+        mainTemplate
+        .replace("@HEADER@", header)
         .replace("@DOCSTRING@", docstring)
+    )
 
 
 def prepareDocumentationViewerHtmlDocWarningDocument(text):
--- a/eric6/UI/CompareDialog.py	Tue Sep 24 18:46:24 2019 +0200
+++ b/eric6/UI/CompareDialog.py	Tue Sep 24 19:08:10 2019 +0200
@@ -53,11 +53,13 @@
         @param line line to work on (string)
         @return line without diff markers (string)
         """
-        return line\
-            .replace('\0+', "")\
-            .replace('\0-', "")\
-            .replace('\0^', "")\
+        return (
+            line
+            .replace('\0+', "")
+            .replace('\0-', "")
+            .replace('\0^', "")
             .replace('\1', "")
+        )
 
     linenumberformat = "{{0:{0:d}d}}".format(linenumberwidth)
     emptylineno = ' ' * linenumberwidth
@@ -434,8 +436,10 @@
         """
         Private slot to enable/disable the Compare button.
         """
-        if not self.file1Picker.text() or \
-           not self.file2Picker.text():
+        if (
+            not self.file1Picker.text() or
+            not self.file2Picker.text()
+        ):
             self.diffButton.setEnabled(False)
         else:
             self.diffButton.setEnabled(True)
--- a/eric6/UI/DiffDialog.py	Tue Sep 24 18:46:24 2019 +0200
+++ b/eric6/UI/DiffDialog.py	Tue Sep 24 19:08:10 2019 +0200
@@ -446,8 +446,10 @@
         """
         Private slot to enable/disable the Compare button.
         """
-        if not self.file1Picker.text() or \
-           not self.file2Picker.text():
+        if (
+            not self.file1Picker.text() or
+            not self.file2Picker.text()
+        ):
             self.diffButton.setEnabled(False)
         else:
             self.diffButton.setEnabled(True)
--- a/eric6/UI/EmailDialog.py	Tue Sep 24 18:46:24 2019 +0200
+++ b/eric6/UI/EmailDialog.py	Tue Sep 24 19:08:10 2019 +0200
@@ -15,8 +15,10 @@
 
 from PyQt5.QtCore import Qt, pyqtSlot
 from PyQt5.QtGui import QCursor, QTextOption
-from PyQt5.QtWidgets import QHeaderView, QLineEdit, QDialog, QInputDialog, \
-    QApplication, QDialogButtonBox, QTreeWidgetItem
+from PyQt5.QtWidgets import (
+    QHeaderView, QLineEdit, QDialog, QInputDialog, QApplication,
+    QDialogButtonBox, QTreeWidgetItem
+)
 
 from E5Gui import E5MessageBox, E5FileDialog
 
--- a/eric6/UI/ErrorLogDialog.py	Tue Sep 24 18:46:24 2019 +0200
+++ b/eric6/UI/ErrorLogDialog.py	Tue Sep 24 19:08:10 2019 +0200
@@ -33,8 +33,10 @@
         self.setupUi(self)
         self.setWindowFlags(Qt.Window)
         
-        pixmap = self.style().standardIcon(QStyle.SP_MessageBoxQuestion)\
+        pixmap = (
+            self.style().standardIcon(QStyle.SP_MessageBoxQuestion)
             .pixmap(32, 32)
+        )
         self.icon.setPixmap(pixmap)
         
         if showMode:
--- a/eric6/UI/FindFileDialog.py	Tue Sep 24 18:46:24 2019 +0200
+++ b/eric6/UI/FindFileDialog.py	Tue Sep 24 19:08:10 2019 +0200
@@ -13,8 +13,9 @@
 
 from PyQt5.QtCore import pyqtSignal, Qt, pyqtSlot
 from PyQt5.QtGui import QCursor
-from PyQt5.QtWidgets import QDialog, QApplication, QMenu, QDialogButtonBox, \
-    QTreeWidgetItem, QComboBox
+from PyQt5.QtWidgets import (
+    QDialog, QApplication, QMenu, QDialogButtonBox, QTreeWidgetItem, QComboBox
+)
 
 from E5Gui.E5Application import e5App
 from E5Gui import E5MessageBox
@@ -66,14 +67,12 @@
         
         self.__replaceMode = replaceMode
         
-        self.stopButton = \
-            self.buttonBox.addButton(self.tr("Stop"),
-                                     QDialogButtonBox.ActionRole)
+        self.stopButton = self.buttonBox.addButton(
+            self.tr("Stop"), QDialogButtonBox.ActionRole)
         self.stopButton.setEnabled(False)
         
-        self.findButton = \
-            self.buttonBox.addButton(self.tr("Find"),
-                                     QDialogButtonBox.ActionRole)
+        self.findButton = self.buttonBox.addButton(
+            self.tr("Find"), QDialogButtonBox.ActionRole)
         self.findButton.setEnabled(False)
         self.findButton.setDefault(True)
         
@@ -265,12 +264,15 @@
         """
         Private slot called to enable the find button.
         """
-        if self.findtextCombo.currentText() == "" or \
-           (self.dirButton.isChecked() and
-            (self.dirPicker.currentText() == "" or
-             not os.path.exists(os.path.abspath(
-                self.dirPicker.currentText())))) or \
-           (self.filterCheckBox.isChecked() and self.filterEdit.text() == ""):
+        if (
+            self.findtextCombo.currentText() == "" or
+            (self.dirButton.isChecked() and
+             (self.dirPicker.currentText() == "" or
+              not os.path.exists(os.path.abspath(
+                self.dirPicker.currentText())))) or
+            (self.filterCheckBox.isChecked() and
+             self.filterEdit.text() == "")
+        ):
             self.findButton.setEnabled(False)
             self.buttonBox.button(QDialogButtonBox.Close).setDefault(True)
         else:
@@ -307,17 +309,20 @@
         """
         Private slot to handle the find button being pressed.
         """
-        if self.__replaceMode and \
-           not e5App().getObject("ViewManager").checkAllDirty():
+        if (
+            self.__replaceMode and
+            not e5App().getObject("ViewManager").checkAllDirty()
+        ):
             return
         
         self.__cancelSearch = False
         
         if self.filterCheckBox.isChecked():
             fileFilter = self.filterEdit.text()
-            fileFilterList = \
-                ["^{0}$".format(filter.replace(".", r"\.").replace("*", ".*"))
-                 for filter in fileFilter.split(";")]
+            fileFilterList = [
+                "^{0}$".format(filter.replace(".", r"\.").replace("*", ".*"))
+                for filter in fileFilter.split(";")
+            ]
             filterRe = re.compile("|".join(fileFilterList))
         
         if self.projectButton.isChecked():
@@ -617,8 +622,9 @@
                 
                 # read the file and split it into textlines
                 try:
-                    text, encoding, hashStr = \
+                    text, encoding, hashStr = (
                         Utilities.readEncodedFileWithHash(fn)
+                    )
                     lines = text.splitlines(True)
                 except (UnicodeError, IOError) as err:
                     E5MessageBox.critical(
--- a/eric6/UI/FindFileNameDialog.py	Tue Sep 24 18:46:24 2019 +0200
+++ b/eric6/UI/FindFileNameDialog.py	Tue Sep 24 19:08:10 2019 +0200
@@ -12,8 +12,9 @@
 import sys
 
 from PyQt5.QtCore import pyqtSignal, pyqtSlot
-from PyQt5.QtWidgets import QWidget, QHeaderView, QApplication, \
-    QDialogButtonBox, QTreeWidgetItem
+from PyQt5.QtWidgets import (
+    QWidget, QHeaderView, QApplication, QDialogButtonBox, QTreeWidgetItem
+)
 
 from E5Gui.E5PathPicker import E5PathPickerModes
 
@@ -113,8 +114,10 @@
             fileName, os.extsep, fileExt and fileExt or '*')
         
         searchPaths = []
-        if self.searchDirCheckBox.isChecked() and \
-           self.searchDirPicker.text() != "":
+        if (
+            self.searchDirCheckBox.isChecked() and
+            self.searchDirPicker.text() != ""
+        ):
             searchPaths.append(self.searchDirPicker.text())
         if self.projectCheckBox.isChecked():
             searchPaths.append(self.project.ppath)
--- a/eric6/UI/Info.py	Tue Sep 24 18:46:24 2019 +0200
+++ b/eric6/UI/Info.py	Tue Sep 24 19:08:10 2019 +0200
@@ -11,8 +11,10 @@
 Program = 'eric6'
 Version = '@@VERSION@@ (rev. @@REVISION@@)'
 VersionOnly = '@@VERSION@@'
-Copyright = 'Copyright (c) 2002 - 2019 Detlev Offenbach' \
-            ' <detlev@die-offenbachs.de>'
+Copyright = (
+    'Copyright (c) 2002 - 2019 Detlev Offenbach'
+    ' <detlev@die-offenbachs.de>'
+)
 CopyrightShort = '(c) 2002 - 2019 Detlev Offenbach'
 BugAddress = 'eric-bugs@eric-ide.python-projects.org'
 FeatureAddress = 'eric-featurerequest@eric-ide.python-projects.org'
--- a/eric6/UI/LogView.py	Tue Sep 24 18:46:24 2019 +0200
+++ b/eric6/UI/LogView.py	Tue Sep 24 19:08:10 2019 +0200
@@ -10,8 +10,9 @@
 
 from PyQt5.QtCore import pyqtSignal, Qt, QRegExp
 from PyQt5.QtGui import QBrush, QTextCursor, QTextDocument
-from PyQt5.QtWidgets import QTextEdit, QApplication, QMenu, QWidget, \
-    QHBoxLayout, QSizePolicy
+from PyQt5.QtWidgets import (
+    QTextEdit, QApplication, QMenu, QWidget, QHBoxLayout, QSizePolicy
+)
 
 from E5Gui.E5Application import e5App
 
--- a/eric6/UI/NotificationWidget.py	Tue Sep 24 18:46:24 2019 +0200
+++ b/eric6/UI/NotificationWidget.py	Tue Sep 24 19:08:10 2019 +0200
@@ -40,10 +40,12 @@
         
         self.__settingPosition = setPosition
         
-        flags = Qt.Tool | \
-            Qt.FramelessWindowHint | \
-            Qt.WindowStaysOnTopHint | \
+        flags = (
+            Qt.Tool |
+            Qt.FramelessWindowHint |
+            Qt.WindowStaysOnTopHint |
             Qt.X11BypassWindowManagerHint
+        )
         if Globals.isWindowsPlatform():
             flags |= Qt.ToolTip
         self.setWindowFlags(flags)
@@ -121,8 +123,9 @@
             return
         
         if evt.button() == Qt.LeftButton:
-            self.__dragPosition = \
+            self.__dragPosition = (
                 evt.globalPos() - self.frameGeometry().topLeft()
+            )
             self.setCursor(Qt.ClosedHandCursor)
             evt.accept()
     
--- a/eric6/UI/Previewer.py	Tue Sep 24 18:46:24 2019 +0200
+++ b/eric6/UI/Previewer.py	Tue Sep 24 19:08:10 2019 +0200
@@ -96,8 +96,10 @@
             self.hide()
             return
         
-        if Preferences.getUI("ShowFilePreview") and \
-                self.__isPreviewable(editor):
+        if (
+            Preferences.getUI("ShowFilePreview") and
+            self.__isPreviewable(editor)
+        ):
             self.show()
             self.__processEditor()
         else:
@@ -145,12 +147,13 @@
             if bool(editor.getFileName()):
                 extension = os.path.normcase(
                     os.path.splitext(editor.getFileName())[1][1:])
-                return extension in \
-                    Preferences.getEditor("PreviewHtmlFileNameExtensions") + \
+                return extension in (
+                    Preferences.getEditor("PreviewHtmlFileNameExtensions") +
                     Preferences.getEditor(
-                        "PreviewMarkdownFileNameExtensions") + \
-                    Preferences.getEditor("PreviewRestFileNameExtensions") + \
+                        "PreviewMarkdownFileNameExtensions") +
+                    Preferences.getEditor("PreviewRestFileNameExtensions") +
                     Preferences.getEditor("PreviewQssFileNameExtensions")
+                )
             elif editor.getLanguage().lower() in [
                     "html", "markdown", "restructuredtext", "qss"]:
                 return True
@@ -171,21 +174,29 @@
                 extension = os.path.normcase(os.path.splitext(fn)[1][1:])
             else:
                 extension = ""
-            if extension in \
-                Preferences.getEditor("PreviewHtmlFileNameExtensions") or \
-                    editor.getLanguage().lower() == "html":
+            if (
+                extension in Preferences.getEditor(
+                    "PreviewHtmlFileNameExtensions") or
+                editor.getLanguage().lower() == "html"
+            ):
                 language = "HTML"
-            elif extension in \
-                Preferences.getEditor("PreviewMarkdownFileNameExtensions") or \
-                    editor.getLanguage().lower() == "markdown":
+            elif (
+                extension in Preferences.getEditor(
+                    "PreviewMarkdownFileNameExtensions") or
+                editor.getLanguage().lower() == "markdown"
+            ):
                 language = "Markdown"
-            elif extension in \
-                Preferences.getEditor("PreviewRestFileNameExtensions") or \
-                    editor.getLanguage().lower() == "restructuredtext":
+            elif (
+                extension in Preferences.getEditor(
+                    "PreviewRestFileNameExtensions") or
+                editor.getLanguage().lower() == "restructuredtext"
+            ):
                 language = "ReST"
-            elif extension in \
-                Preferences.getEditor("PreviewQssFileNameExtensions") or \
-                    editor.getLanguage().lower() == "qss":
+            elif (
+                extension in Preferences.getEditor(
+                    "PreviewQssFileNameExtensions") or
+                editor.getLanguage().lower() == "qss"
+            ):
                 language = "QSS"
             else:
                 language = ""
--- a/eric6/UI/Previewers/PreviewerHTML.py	Tue Sep 24 18:46:24 2019 +0200
+++ b/eric6/UI/Previewers/PreviewerHTML.py	Tue Sep 24 19:08:10 2019 +0200
@@ -18,8 +18,9 @@
 
 from PyQt5.QtCore import pyqtSlot, pyqtSignal, Qt, QUrl, QThread
 from PyQt5.QtGui import QCursor
-from PyQt5.QtWidgets import QWidget, QVBoxLayout, QLabel, QCheckBox, \
-    QSizePolicy, QToolTip
+from PyQt5.QtWidgets import (
+    QWidget, QVBoxLayout, QLabel, QCheckBox, QSizePolicy, QToolTip
+)
 
 from E5Gui.E5Application import e5App
 
@@ -172,17 +173,23 @@
                 extension = os.path.normcase(os.path.splitext(fn)[1][1:])
             else:
                 extension = ""
-            if extension in \
-                Preferences.getEditor("PreviewHtmlFileNameExtensions") or \
-                    editor.getLanguage() == "HTML":
+            if (
+                extension in Preferences.getEditor(
+                    "PreviewHtmlFileNameExtensions") or
+                editor.getLanguage() == "HTML"
+            ):
                 language = "HTML"
-            elif extension in \
-                Preferences.getEditor("PreviewMarkdownFileNameExtensions") or \
-                    editor.getLanguage().lower() == "markdown":
+            elif (
+                extension in Preferences.getEditor(
+                    "PreviewMarkdownFileNameExtensions") or
+                editor.getLanguage().lower() == "markdown"
+            ):
                 language = "Markdown"
-            elif extension in \
-                Preferences.getEditor("PreviewRestFileNameExtensions") or \
-                    editor.getLanguage().lower() == "restructuredtext":
+            elif (
+                extension in Preferences.getEditor(
+                    "PreviewRestFileNameExtensions") or
+                editor.getLanguage().lower() == "restructuredtext"
+            ):
                 language = "ReST"
             else:
                 self.__setHtml(fn, self.tr(
@@ -651,9 +658,11 @@
             extensions = ['fenced_code', 'extra']
         
         # version 2.0 supports only extension names, not instances
-        if markdown.version_info[0] > 2 or \
-                (markdown.version_info[0] == 2 and
-                 markdown.version_info[1] > 0):
+        if (
+            markdown.version_info[0] > 2 or
+            (markdown.version_info[0] == 2 and
+             markdown.version_info[1] > 0)
+        ):
             class _StrikeThroughExtension(markdown.Extension):
                 """
                 Class is placed here, because it depends on imported markdown,
--- a/eric6/UI/Previewers/PreviewerQSS.py	Tue Sep 24 18:46:24 2019 +0200
+++ b/eric6/UI/Previewers/PreviewerQSS.py	Tue Sep 24 19:08:10 2019 +0200
@@ -10,8 +10,9 @@
 
 import os
 
-from PyQt5.QtWidgets import QWidget, QMenu, QLabel, QHeaderView, \
-    QListWidgetItem
+from PyQt5.QtWidgets import (
+    QWidget, QMenu, QLabel, QHeaderView, QListWidgetItem
+)
 
 from .Ui_PreviewerQSS import Ui_PreviewerQSS
 
@@ -72,8 +73,10 @@
                 extension = os.path.normcase(os.path.splitext(fn)[1][1:])
             else:
                 extension = ""
-            if extension in \
-                    Preferences.getEditor("PreviewQssFileNameExtensions"):
+            if (
+                extension in Preferences.getEditor(
+                    "PreviewQssFileNameExtensions")
+            ):
                 styleSheet = editor.text()
                 if styleSheet:
                     self.scrollAreaWidgetContents.setStyleSheet(styleSheet)
--- a/eric6/UI/PythonAstViewer.py	Tue Sep 24 18:46:24 2019 +0200
+++ b/eric6/UI/PythonAstViewer.py	Tue Sep 24 19:08:10 2019 +0200
@@ -13,8 +13,10 @@
 
 from PyQt5.QtCore import pyqtSlot, Qt, QTimer
 from PyQt5.QtGui import QCursor, QBrush
-from PyQt5.QtWidgets import QTreeWidget, QApplication, QTreeWidgetItem, \
-    QAbstractItemView, QWidget, QVBoxLayout
+from PyQt5.QtWidgets import (
+    QTreeWidget, QApplication, QTreeWidgetItem, QAbstractItemView, QWidget,
+    QVBoxLayout
+)
 
 from ThirdParty.asttokens.asttokens import ASTTokens
 
@@ -255,16 +257,20 @@
         itm = QTreeWidgetItem(parent, [text])
         itm.setExpanded(True)
         
-        if hasattr(nodeOrFields, "lineno") and \
-           hasattr(nodeOrFields, "col_offset"):
+        if (
+            hasattr(nodeOrFields, "lineno") and
+            hasattr(nodeOrFields, "col_offset")
+        ):
             itm.setData(0, self.StartLineRole, nodeOrFields.lineno)
             itm.setData(0, self.StartIndexRole, nodeOrFields.col_offset)
             startStr = self.tr("{0},{1}").format(
                 nodeOrFields.lineno, nodeOrFields.col_offset)
             endStr = ""
             
-            if hasattr(nodeOrFields, "end_lineno") and \
-               hasattr(nodeOrFields, "end_col_offset"):
+            if (
+                hasattr(nodeOrFields, "end_lineno") and
+                hasattr(nodeOrFields, "end_col_offset")
+            ):
                 itm.setData(0, self.EndLineRole, nodeOrFields.end_lineno)
                 itm.setData(0, self.EndIndexRole,
                             nodeOrFields.end_col_offset)
--- a/eric6/UI/SymbolsWidget.py	Tue Sep 24 18:46:24 2019 +0200
+++ b/eric6/UI/SymbolsWidget.py	Tue Sep 24 19:08:10 2019 +0200
@@ -12,8 +12,10 @@
 import unicodedata
 import html.entities
 
-from PyQt5.QtCore import pyqtSlot, pyqtSignal, QAbstractTableModel, \
-    QModelIndex, Qt, QItemSelectionModel, QLocale
+from PyQt5.QtCore import (
+    pyqtSlot, pyqtSignal, QAbstractTableModel, QModelIndex, Qt,
+    QItemSelectionModel, QLocale
+)
 from PyQt5.QtGui import QColor
 from PyQt5.QtWidgets import QWidget, QHeaderView, QAbstractItemView
 
--- a/eric6/UI/UserInterface.py	Tue Sep 24 18:46:24 2019 +0200
+++ b/eric6/UI/UserInterface.py	Tue Sep 24 19:08:10 2019 +0200
@@ -12,16 +12,20 @@
 import sys
 import logging
 
-from PyQt5.QtCore import pyqtSlot, QTimer, QFile, QFileInfo, pyqtSignal, \
-    PYQT_VERSION_STR, QDate, QIODevice, qVersion, QProcess, QSize, QUrl, \
-    QObject, Qt, QUuid, QThread, QUrlQuery
+from PyQt5.QtCore import (
+    pyqtSlot, QTimer, QFile, QFileInfo, pyqtSignal, PYQT_VERSION_STR, QDate,
+    QIODevice, qVersion, QProcess, QSize, QUrl, QObject, Qt, QUuid, QThread,
+    QUrlQuery
+)
 from PyQt5.QtGui import QKeySequence, QDesktopServices
-from PyQt5.QtWidgets import QSizePolicy, QWidget, QWhatsThis, QToolBar, \
-    QDialog, QSplitter, QApplication, QMenu, QVBoxLayout, QDockWidget, \
-    QAction, QLabel
+from PyQt5.QtWidgets import (
+    QSizePolicy, QWidget, QWhatsThis, QToolBar, QDialog, QSplitter,
+    QApplication, QMenu, QVBoxLayout, QDockWidget, QAction, QLabel
+)
 from PyQt5.Qsci import QSCINTILLA_VERSION_STR
-from PyQt5.QtNetwork import QNetworkProxyFactory, QNetworkAccessManager, \
-    QNetworkRequest, QNetworkReply
+from PyQt5.QtNetwork import (
+    QNetworkProxyFactory, QNetworkAccessManager, QNetworkRequest, QNetworkReply
+)
 
 from .Info import Version, VersionOnly, BugAddress, Program, FeatureAddress
 from . import Config
@@ -42,8 +46,9 @@
 import UI.PixmapCache
 
 from E5Network.E5NetworkIcon import E5NetworkIcon
-from E5Network.E5NetworkProxyFactory import E5NetworkProxyFactory, \
-    proxyAuthenticationRequired
+from E5Network.E5NetworkProxyFactory import (
+    E5NetworkProxyFactory, proxyAuthenticationRequired
+)
 try:
     from E5Network.E5SslErrorHandler import E5SslErrorHandler
     SSL_AVAILABLE = True
@@ -657,8 +662,9 @@
         self.pluginManager.initPluginToolbars(self.toolbarManager)
         if Preferences.getPluginManager("StartupCleanup"):
             splash.showMessage(self.tr("Cleaning Plugins Download Area..."))
-            from PluginManager.PluginRepositoryDialog import \
+            from PluginManager.PluginRepositoryDialog import (
                 PluginRepositoryDownloadCleanup
+            )
             PluginRepositoryDownloadCleanup(quiet=True)
         
         # now read the keyboard shortcuts for all the actions
@@ -740,8 +746,8 @@
         # Create the view manager depending on the configuration setting
         logging.debug("Creating Viewmanager...")
         import ViewManager
-        self.viewmanager = \
-            ViewManager.factory(self, self, debugServer, self.pluginManager)
+        self.viewmanager = ViewManager.factory(
+            self, self, debugServer, self.pluginManager)
         leftWidget = QWidget()
         layout = QVBoxLayout()
         layout.setContentsMargins(1, 1, 1, 1)
@@ -973,8 +979,8 @@
         else:
             self.__shellParent = self.hToolboxDock
         from QScintilla.Shell import ShellAssembly
-        self.shellAssembly = \
-            ShellAssembly(debugServer, self.viewmanager, self.project, True)
+        self.shellAssembly = ShellAssembly(
+            debugServer, self.viewmanager, self.project, True)
         self.shell = self.shellAssembly.shell()
         self.__shellParent.widget().insertItem(
             0, self.shellAssembly, UI.PixmapCache.getIcon("shell.png"),
@@ -1170,8 +1176,8 @@
         else:
             self.__shellParent = self.bottomSidebar
         from QScintilla.Shell import ShellAssembly
-        self.shellAssembly = \
-            ShellAssembly(debugServer, self.viewmanager, self.project, True)
+        self.shellAssembly = ShellAssembly(
+            debugServer, self.viewmanager, self.project, True)
         self.shell = self.shellAssembly.shell()
         self.__shellParent.insertTab(0, self.shellAssembly,
                                      UI.PixmapCache.getIcon("shell.png"),
@@ -1469,8 +1475,7 @@
         @param project project name to be displayed (string)
         """
         if editor is not None and self.captionShowsFilename:
-            self.capEditor = \
-                Utilities.compactPath(editor, self.maxFilePathLen)
+            self.capEditor = Utilities.compactPath(editor, self.maxFilePathLen)
         if project is not None:
             self.capProject = project
         
@@ -2904,8 +2909,10 @@
         """
         self.__menus = {}
         mb = self.menuBar()
-        if Utilities.isLinuxPlatform() and \
-           not Preferences.getUI("UseNativeMenuBar"):
+        if (
+            Utilities.isLinuxPlatform() and
+            not Preferences.getUI("UseNativeMenuBar")
+        ):
             mb.setNativeMenuBar(False)
         
         ##############################################################
@@ -2965,8 +2972,9 @@
         ## Project menu
         ##############################################################
         
-        self.__menus["project"], self.__menus["project_tools"] = \
+        self.__menus["project"], self.__menus["project_tools"] = (
             self.project.initMenus()
+        )
         mb.addMenu(self.__menus["project"])
         mb.addMenu(self.__menus["project_tools"])
         
@@ -2974,8 +2982,9 @@
         ## Start and Debug menus
         ##############################################################
         
-        self.__menus["start"], self.__menus["debug"] = \
+        self.__menus["start"], self.__menus["debug"] = (
             self.debuggerUI.initMenus()
+        )
         mb.addMenu(self.__menus["start"])
         mb.addMenu(self.__menus["debug"])
         
@@ -3158,8 +3167,8 @@
         ## Window/Toolbars menu
         ##############################################################
         
-        self.__menus["toolbars"] = \
-            QMenu(self.tr("&Toolbars"), self.__menus["window"])
+        self.__menus["toolbars"] = QMenu(
+            self.tr("&Toolbars"), self.__menus["window"])
         self.__menus["toolbars"].setTearOffEnabled(True)
         self.__menus["toolbars"].aboutToShow.connect(self.__showToolbarsMenu)
         self.__menus["toolbars"].triggered.connect(self.__TBMenuTriggered)
@@ -3637,26 +3646,31 @@
         versionText = self.tr(
             """<h3>Version Numbers</h3>"""
             """<table>""")
-        versionText += """<tr><td><b>Python</b></td><td>{0}, {1}</td></tr>"""\
-            .format(sys.version.split()[0], sizeStr)
-        versionText += """<tr><td><b>Qt</b></td><td>{0}</td></tr>"""\
-            .format(qVersion())
-        versionText += """<tr><td><b>PyQt</b></td><td>{0}</td></tr>"""\
-            .format(PYQT_VERSION_STR)
-        versionText += """<tr><td><b>sip</b></td><td>{0}</td></tr>"""\
-            .format(sip_version_str)
-        versionText += """<tr><td><b>QScintilla</b></td><td>{0}</td></tr>"""\
-            .format(QSCINTILLA_VERSION_STR)
+        versionText += (
+            """<tr><td><b>Python</b></td><td>{0}, {1}</td></tr>"""
+        ).format(sys.version.split()[0], sizeStr)
+        versionText += (
+            """<tr><td><b>Qt</b></td><td>{0}</td></tr>"""
+        ).format(qVersion())
+        versionText += (
+            """<tr><td><b>PyQt</b></td><td>{0}</td></tr>"""
+        ).format(PYQT_VERSION_STR)
+        versionText += (
+            """<tr><td><b>sip</b></td><td>{0}</td></tr>"""
+        ).format(sip_version_str)
+        versionText += (
+            """<tr><td><b>QScintilla</b></td><td>{0}</td></tr>"""
+        ).format(QSCINTILLA_VERSION_STR)
         try:
             from WebBrowser.Tools import WebBrowserTools
             chromeVersion = WebBrowserTools.getWebEngineVersions()[0]
-            versionText += \
-                """<tr><td><b>WebEngine</b></td><td>{0}</td></tr>"""\
-                .format(chromeVersion)
+            versionText += (
+                """<tr><td><b>WebEngine</b></td><td>{0}</td></tr>"""
+            ).format(chromeVersion)
         except ImportError:
             pass
-        versionText += """<tr><td><b>{0}</b></td><td>{1}</td></tr>"""\
-            .format(Program, Version)
+        versionText += ("""<tr><td><b>{0}</b></td><td>{1}</td></tr>"""
+                        ).format(Program, Version)
         versionText += self.tr("""</table>""")
         
         E5MessageBox.about(self, Program, versionText)
@@ -4270,19 +4284,25 @@
                     self.profiles[self.currentProfile][2][5] = state
             # step 2: save the visibility of the windows of the active profile
             if self.__layoutType == "Toolboxes":
-                self.profiles[self.currentProfile][1][0] = \
+                self.profiles[self.currentProfile][1][0] = (
                     self.lToolboxDock.isVisible()
-                self.profiles[self.currentProfile][1][1] = \
+                )
+                self.profiles[self.currentProfile][1][1] = (
                     self.hToolboxDock.isVisible()
-                self.profiles[self.currentProfile][1][2] = \
+                )
+                self.profiles[self.currentProfile][1][2] = (
                     self.rToolboxDock.isVisible()
+                )
             elif self.__layoutType == "Sidebars":
-                self.profiles[self.currentProfile][1][0] = \
+                self.profiles[self.currentProfile][1][0] = (
                     self.leftSidebar.isVisible()
-                self.profiles[self.currentProfile][1][1] = \
+                )
+                self.profiles[self.currentProfile][1][1] = (
                     self.bottomSidebar.isVisible()
-                self.profiles[self.currentProfile][1][2] = \
+                )
+                self.profiles[self.currentProfile][1][2] = (
                     self.rightSidebar.isVisible()
+                )
             Preferences.setUI("ViewProfiles2", self.profiles)
     
     def __activateViewProfile(self, name, save=True):
@@ -4753,8 +4773,9 @@
         """
         Private slot to handle the tool groups configuration menu entry.
         """
-        from Preferences.ToolGroupConfigurationDialog import \
+        from Preferences.ToolGroupConfigurationDialog import (
             ToolGroupConfigurationDialog
+        )
         dlg = ToolGroupConfigurationDialog(
             self.toolGroups, self.currentToolGroup, self)
         if dlg.exec_() == QDialog.Accepted:
@@ -4954,8 +4975,11 @@
         if fn is not None:
             fn = fn.replace('.qm', '.ts')
             try:
-                if os.path.isfile(fn) and os.path.getsize(fn) and \
-                        fn not in args:
+                if (
+                    os.path.isfile(fn) and
+                    os.path.getsize(fn) and
+                    fn not in args
+                ):
                     args.append(fn)
                 else:
                     E5MessageBox.critical(
@@ -5150,8 +5174,10 @@
                     .format(fn))
                 return
                 
-        if not os.path.isfile(viewer) or \
-                not proc.startDetached(sys.executable, args):
+        if (
+            not os.path.isfile(viewer) or
+            not proc.startDetached(sys.executable, args)
+        ):
             E5MessageBox.critical(
                 self,
                 self.tr('Process Generation Error'),
@@ -5205,8 +5231,10 @@
                             .format(fn))
                         return
         
-        if not os.path.isfile(viewer) or \
-                not proc.startDetached(sys.executable, args):
+        if (
+            not os.path.isfile(viewer) or
+            not proc.startDetached(sys.executable, args)
+        ):
             E5MessageBox.critical(
                 self,
                 self.tr('Process Generation Error'),
@@ -5226,8 +5254,10 @@
         args = []
         args.append(browser)
         
-        if not os.path.isfile(browser) or \
-                not proc.startDetached(sys.executable, args):
+        if (
+            not os.path.isfile(browser) or
+            not proc.startDetached(sys.executable, args)
+        ):
             E5MessageBox.critical(
                 self,
                 self.tr('Process Generation Error'),
@@ -5296,8 +5326,10 @@
         args = []
         args.append(snap)
         
-        if not os.path.isfile(snap) or \
-                not proc.startDetached(sys.executable, args):
+        if (
+            not os.path.isfile(snap) or
+            not proc.startDetached(sys.executable, args)
+        ):
             E5MessageBox.critical(
                 self,
                 self.tr('Process Generation Error'),
@@ -5369,8 +5401,8 @@
         args = []
         argv = Utilities.parseOptionString(tool['arguments'])
         args.extend(argv)
-        t = self.tr("Starting process '{0} {1}'.\n")\
-            .format(program, tool['arguments'])
+        t = self.tr("Starting process '{0} {1}'.\n"
+                    ).format(program, tool['arguments'])
         self.appendToStdout(t)
         
         proc.finished.connect(self.__toolFinished)
@@ -5409,8 +5441,10 @@
         for program, toolProc, toolProcData in self.toolProcs:
             toolProc.setReadChannel(QProcess.StandardOutput)
             
-            if toolProcData[0] is None or \
-               toolProcData[1] not in ["insert", "replaceSelection"]:
+            if (
+                toolProcData[0] is None or
+                toolProcData[1] not in ["insert", "replaceSelection"]
+            ):
                 # not connected to an editor or wrong mode
                 while toolProc.canReadLine():
                     output = str(toolProc.readLine(), ioEncoding, 'replace')
@@ -5472,14 +5506,16 @@
         if not pythonDocDir:
             if Utilities.isWindowsPlatform():
                 venvName = Preferences.getDebugger("Python3VirtualEnv")
-                interpreter = e5App().getObject("VirtualEnvManager")\
+                interpreter = (
+                    e5App().getObject("VirtualEnvManager")
                     .getVirtualenvInterpreter(venvName)
+                )
                 if interpreter:
                     default = os.path.join(os.path.dirname(interpreter), "doc")
                 else:
                     default = ""
-                pythonDocDir = \
-                    Utilities.getEnvironmentEntry("PYTHON3DOCDIR", default)
+                pythonDocDir = Utilities.getEnvironmentEntry(
+                    "PYTHON3DOCDIR", default)
             else:
                 pythonDocDir = Utilities.getEnvironmentEntry(
                     "PYTHON3DOCDIR",
@@ -5540,14 +5576,16 @@
         if not pythonDocDir:
             if Utilities.isWindowsPlatform():
                 venvName = Preferences.getDebugger("Python2VirtualEnv")
-                interpreter = e5App().getObject("VirtualEnvManager")\
+                interpreter = (
+                    e5App().getObject("VirtualEnvManager")
                     .getVirtualenvInterpreter(venvName)
+                )
                 if interpreter:
                     default = os.path.join(os.path.dirname(interpreter), "doc")
                 else:
                     default = ""
-                pythonDocDir = \
-                    Utilities.getEnvironmentEntry("PYTHON2DOCDIR", default)
+                pythonDocDir = Utilities.getEnvironmentEntry(
+                    "PYTHON2DOCDIR", default)
             else:
                 pythonDocDir = Utilities.getEnvironmentEntry(
                     "PYTHON2DOCDIR",
@@ -5994,8 +6032,9 @@
             -1 = server exited with an error code)
         @rtype int
         """
-        from WebBrowser.WebBrowserSingleApplication import \
+        from WebBrowser.WebBrowserSingleApplication import (
             WebBrowserSingleApplicationClient
+        )
         
         webBrowserClient = WebBrowserSingleApplicationClient(
             self.__webBrowserSAName)
@@ -6008,9 +6047,11 @@
                 connectCount -= 1
                 QThread.msleep(1000)
                 QApplication.processEvents()
-            if process.state() == QProcess.NotRunning and \
-               process.exitStatus() == QProcess.NormalExit and \
-               process.exitCode() == 100:
+            if (
+                process.state() == QProcess.NotRunning and
+                process.exitStatus() == QProcess.NormalExit and
+                process.exitCode() == 100
+            ):
                 # Process exited prematurely due to missing pre-requisites
                 return -1
         if res <= 0:
@@ -6098,10 +6139,12 @@
                 self.__configurationDialog.setPreferences()
                 Preferences.syncPreferences()
                 self.__preferencesChanged()
-            self.__lastConfigurationPageName = \
+            self.__lastConfigurationPageName = (
                 self.__configurationDialog.getConfigurationPageName()
-            self.__expandedConfigurationEntries = \
+            )
+            self.__expandedConfigurationEntries = (
                 self.__configurationDialog.getExpandedEntries()
+            )
             
             self.__configurationDialog.deleteLater()
             self.__configurationDialog = None
@@ -6201,8 +6244,9 @@
         Preferences.convertPasswords(oldPassword, newPassword)
         variant = Globals.getWebBrowserSupport()
         if variant == "QtWebEngine":
-            from WebBrowser.Passwords.PasswordManager import \
+            from WebBrowser.Passwords.PasswordManager import (
                 PasswordManager
+            )
             pwManager = PasswordManager()
             pwManager.masterPasswordChanged(oldPassword, newPassword)
         Utilities.crypto.changeRememberedMaster(newPassword)
@@ -6316,8 +6360,9 @@
         if dlg.exec_() == QDialog.Accepted:
             # recent files, recent projects, recent multi  projects,
             # debug histories, shell histories
-            (files, projects, multiProjects, debug, shell, vcs, plugins) = \
+            (files, projects, multiProjects, debug, shell, vcs, plugins) = (
                 dlg.getData()
+            )
             if files:
                 # clear list of recently opened files
                 self.viewmanager.clearRecent()
@@ -6354,8 +6399,8 @@
         """
         from Debugger.DebugClientCapabilities import HasUnittest
         self.__setWindowCaption(project=self.project.name)
-        cap = e5App().getObject("DebugServer")\
-            .getClientCapabilities(self.project.getProjectLanguage())
+        cap = e5App().getObject("DebugServer").getClientCapabilities(
+            self.project.getProjectLanguage())
         self.utProjectAct.setEnabled(cap & HasUnittest)
         self.utProjectOpen = cap & HasUnittest
         
@@ -6632,9 +6677,11 @@
         """
         Private slot to write a crash session file.
         """
-        if not self.__readingSession and \
-            not self.__disableCrashSession and \
-                Preferences.getUI("CrashSessionEnabled"):
+        if (
+            not self.__readingSession and
+            not self.__disableCrashSession and
+            Preferences.getUI("CrashSessionEnabled")
+        ):
             self.__writeSession(crashSession=True)
     
     def __readCrashSession(self):
@@ -6645,9 +6692,11 @@
         @rtype bool
         """
         res = False
-        if not self.__disableCrashSession and \
-            not self.__noCrashOpenAtStartup and \
-                Preferences.getUI("OpenCrashSessionOnStartup"):
+        if (
+            not self.__disableCrashSession and
+            not self.__noCrashOpenAtStartup and
+            Preferences.getUI("OpenCrashSessionOnStartup")
+        ):
             fn = os.path.join(Utilities.getConfigDir(),
                               "eric6_crash_session.e5s")
             if os.path.exists(fn):
@@ -6707,8 +6756,8 @@
         """
         if self.replaceFilesDialog is None:
             from .FindFileDialog import FindFileDialog
-            self.replaceFilesDialog = \
-                FindFileDialog(self.project, replaceMode=True)
+            self.replaceFilesDialog = FindFileDialog(
+                self.project, replaceMode=True)
             self.replaceFilesDialog.sourceFile.connect(
                 self.viewmanager.openSourceFile)
             self.replaceFilesDialog.designerFile.connect(self.__designer)
@@ -7081,9 +7130,11 @@
             ioEncoding = Preferences.getSystem("IOEncoding")
             versions = str(reply.readAll(), ioEncoding, 'replace').splitlines()
         reply.close()
-        if reply.error() != QNetworkReply.NoError or \
-            len(versions) == 0 or \
-                versions[0].startswith("<"):
+        if (
+            reply.error() != QNetworkReply.NoError or
+            len(versions) == 0 or
+            versions[0].startswith("<")
+        ):
             # network error or an error page
             self.httpAlternative += 1
             if self.httpAlternative >= len(self.__httpAlternatives):
@@ -7247,11 +7298,12 @@
             if versions[line] == "---":
                 break
             
-            versionText += """<tr><td>{0}</td><td><a href="{1}">{2}</a>""" \
-                """</td></tr>""".format(
-                    versions[line], versions[line + 1],
-                    'sourceforge' in versions[line + 1] and
-                    "SourceForge" or versions[line + 1])
+            versionText += (
+                """<tr><td>{0}</td><td><a href="{1}">{2}</a></td></tr>"""
+            ).format(
+                versions[line], versions[line + 1],
+                'sourceforge' in versions[line + 1] and
+                "SourceForge" or versions[line + 1])
             line += 2
         versionText += self.tr("""</table>""")
         

eric ide

mercurial