eric6/WebBrowser/History/HistoryManager.py

changeset 7268
a28338eaf694
parent 7229
53054eb5b15a
child 7360
9190402e4505
diff -r aedc309827c7 -r a28338eaf694 eric6/WebBrowser/History/HistoryManager.py
--- a/eric6/WebBrowser/History/HistoryManager.py	Wed Sep 25 18:37:35 2019 +0200
+++ b/eric6/WebBrowser/History/HistoryManager.py	Wed Sep 25 18:48:22 2019 +0200
@@ -10,9 +10,10 @@
 
 import os
 
-from PyQt5.QtCore import pyqtSignal, pyqtSlot, QFileInfo, QDateTime, QDate, \
-    QTime, QUrl, QTimer, QFile, QIODevice, QByteArray, QDataStream, \
-    QTemporaryFile, QObject
+from PyQt5.QtCore import (
+    pyqtSignal, pyqtSlot, QFileInfo, QDateTime, QDate, QTime, QUrl, QTimer,
+    QFile, QIODevice, QByteArray, QDataStream, QTemporaryFile, QObject
+)
 
 from E5Gui import E5MessageBox
 
@@ -51,9 +52,11 @@
             (HistoryEntry)
         @return flag indicating equality (boolean)
         """
-        return other.title == self.title and \
-            other.url == self.url and \
+        return (
+            other.title == self.title and
+            other.url == self.url and
             other.dateTime == self.dateTime
+        )
     
     def __lt__(self, other):
         """
@@ -141,10 +144,10 @@
         from .HistoryTreeModel import HistoryTreeModel
         
         self.__historyModel = HistoryModel(self, self)
-        self.__historyFilterModel = \
-            HistoryFilterModel(self.__historyModel, self)
-        self.__historyTreeModel = \
-            HistoryTreeModel(self.__historyFilterModel, self)
+        self.__historyFilterModel = HistoryFilterModel(
+            self.__historyModel, self)
+        self.__historyTreeModel = HistoryTreeModel(
+            self.__historyFilterModel, self)
         
         self.__startFrequencyTimer()
     
@@ -279,8 +282,10 @@
         if url.scheme() not in ["eric", "about", "data", "chrome"]:
             cleanUrlStr = self.__cleanUrlStr(url)
             for index in range(len(self.__history)):
-                if cleanUrlStr == self.__history[index].url and \
-                   (not title or title == self.__history[index].title):
+                if (
+                    cleanUrlStr == self.__history[index].url and
+                    (not title or title == self.__history[index].title)
+                ):
                     itm = self.__history[index]
                     self.__lastSavedUrl = ""
                     self.__history.remove(itm)
@@ -410,9 +415,11 @@
             self.historyReset.emit()
         else:
             breakMS = QDateTime.currentMSecsSinceEpoch() - period
-            while self.__history and \
+            while (
+                self.__history and
                 (QDateTime(self.__history[0].dateTime).toMSecsSinceEpoch() >
-                 breakMS):
+                 breakMS)
+            ):
                 itm = self.__history.pop(0)
                 self.entryRemoved.emit(itm)
         self.__lastSavedUrl = ""

eric ide

mercurial