eric6/WebBrowser/QtHelp/HelpDocsInstaller.py

changeset 7269
0c63ea7f94bd
parent 7229
53054eb5b15a
child 7360
9190402e4505
--- a/eric6/WebBrowser/QtHelp/HelpDocsInstaller.py	Wed Sep 25 18:48:22 2019 +0200
+++ b/eric6/WebBrowser/QtHelp/HelpDocsInstaller.py	Wed Sep 25 18:52:40 2019 +0200
@@ -11,8 +11,9 @@
 
 import os
 
-from PyQt5.QtCore import pyqtSignal, QThread, Qt, QMutex, QDateTime, QDir, \
-    QLibraryInfo, QFileInfo
+from PyQt5.QtCore import (
+    pyqtSignal, QThread, Qt, QMutex, QDateTime, QDir, QLibraryInfo, QFileInfo
+)
 from PyQt5.QtHelp import QHelpEngineCore
 
 from eric6config import getConfig
@@ -132,8 +133,10 @@
                 QDir.separator() + "qch")
         elif version == 5:
             docsPath = QLibraryInfo.location(QLibraryInfo.DocumentationPath)
-            if not os.path.isdir(docsPath) or \
-                    len(QDir(docsPath).entryList(["*.qch"])) == 0:
+            if (
+                not os.path.isdir(docsPath) or
+                len(QDir(docsPath).entryList(["*.qch"])) == 0
+            ):
                 # Qt installer is a bit buggy; it's missing a symbolic link
                 docsPathList = QDir.fromNativeSeparators(docsPath).split("/")
                 docsPath = os.sep.join(
@@ -159,11 +162,13 @@
                 if not namespace:
                     continue
                 
-                if dt.isValid() and \
-                   namespace in engine.registeredDocumentations() and \
-                   fi.lastModified().toString(Qt.ISODate) == \
-                    dt.toString(Qt.ISODate) and \
-                   qchFile == fi.absoluteFilePath():
+                if (
+                    dt.isValid() and
+                    namespace in engine.registeredDocumentations() and
+                    (fi.lastModified().toString(Qt.ISODate) ==
+                     dt.toString(Qt.ISODate)) and
+                    qchFile == fi.absoluteFilePath()
+                ):
                     return False
                 
                 if namespace in engine.registeredDocumentations():
@@ -221,11 +226,13 @@
                 if not namespace:
                     continue
                 
-                if dt.isValid() and \
-                   namespace in engine.registeredDocumentations() and \
-                   fi.lastModified().toString(Qt.ISODate) == \
-                    dt.toString(Qt.ISODate) and \
-                   qchFile == fi.absoluteFilePath():
+                if (
+                    dt.isValid() and
+                    namespace in engine.registeredDocumentations() and
+                    (fi.lastModified().toString(Qt.ISODate) ==
+                     dt.toString(Qt.ISODate)) and
+                    qchFile == fi.absoluteFilePath()
+                ):
                     return False
                 
                 if namespace in engine.registeredDocumentations():

eric ide

mercurial