eric6/Plugins/VcsPlugins/vcsGit/GitLogBrowserDialog.py

changeset 7257
c4d0cac9b5c9
parent 7229
53054eb5b15a
child 7360
9190402e4505
--- a/eric6/Plugins/VcsPlugins/vcsGit/GitLogBrowserDialog.py	Sat Sep 21 20:30:56 2019 +0200
+++ b/eric6/Plugins/VcsPlugins/vcsGit/GitLogBrowserDialog.py	Sat Sep 21 22:03:03 2019 +0200
@@ -11,12 +11,16 @@
 import os
 import collections
 
-from PyQt5.QtCore import pyqtSlot, Qt, QDate, QProcess, QTimer, QRegExp, \
-    QSize, QPoint, QFileInfo
-from PyQt5.QtGui import QCursor, QColor, QPixmap, QPainter, QPen, QIcon, \
-    QTextCursor
-from PyQt5.QtWidgets import QWidget, QDialogButtonBox, QHeaderView, \
-    QTreeWidgetItem, QApplication, QLineEdit, QMenu, QInputDialog
+from PyQt5.QtCore import (
+    pyqtSlot, Qt, QDate, QProcess, QTimer, QRegExp, QSize, QPoint, QFileInfo
+)
+from PyQt5.QtGui import (
+    QCursor, QColor, QPixmap, QPainter, QPen, QIcon, QTextCursor
+)
+from PyQt5.QtWidgets import (
+    QWidget, QDialogButtonBox, QHeaderView, QTreeWidgetItem, QApplication,
+    QLineEdit, QMenu, QInputDialog
+)
 
 from E5Gui.E5Application import e5App
 from E5Gui import E5MessageBox, E5FileDialog
@@ -372,8 +376,10 @@
         
         @param e close event (QCloseEvent)
         """
-        if self.process is not None and \
-           self.process.state() != QProcess.NotRunning:
+        if (
+            self.process is not None and
+            self.process.state() != QProcess.NotRunning
+        ):
             self.process.terminate()
             QTimer.singleShot(2000, self.process.kill)
             self.process.waitForFinished(3000)
@@ -715,10 +721,11 @@
                 self.__childrenInfo[parent].append(commitId)
         
         if self.logTree.topLevelItemCount() > 1:
-            topedges = \
+            topedges = (
                 self.logTree.topLevelItem(
-                    self.logTree.indexOfTopLevelItem(itm) - 1)\
+                    self.logTree.indexOfTopLevelItem(itm) - 1)
                 .data(0, self.__edgesRole)
+            )
         else:
             topedges = None
         
@@ -871,8 +878,10 @@
         Private slot called when the process finished or the user pressed
         the button.
         """
-        if self.process is not None and \
-           self.process.state() != QProcess.NotRunning:
+        if (
+            self.process is not None and
+            self.process.state() != QProcess.NotRunning
+        ):
             self.process.terminate()
             QTimer.singleShot(2000, self.process.kill)
             self.process.waitForFinished(3000)
@@ -906,8 +915,10 @@
         )
         for date in [logEntry["authordate"], logEntry["committerdate"]]:
             dt = QDate.fromString(date, Qt.ISODate)
-            if not self.__maxDate.isValid() and \
-               not self.__minDate.isValid():
+            if (
+                not self.__maxDate.isValid() and
+                not self.__minDate.isValid()
+            ):
                 self.__maxDate = dt
                 self.__minDate = dt
             else:
@@ -1217,9 +1228,11 @@
                         txt = topItem.data(0, self.__subjectRole)
                 else:
                     txt = topItem.text(fieldIndex)
-                if topItem.text(self.DateColumn) <= to_ and \
-                   topItem.text(self.DateColumn) >= from_ and \
-                   searchRx.indexIn(txt) > -1:
+                if (
+                    topItem.text(self.DateColumn) <= to_ and
+                    topItem.text(self.DateColumn) >= from_ and
+                    searchRx.indexIn(txt) > -1
+                ):
                     topItem.setHidden(False)
                     if topItem is currentItem:
                         self.on_logTree_currentItemChanged(topItem, None)
@@ -1308,8 +1321,9 @@
             index2 = self.logTree.indexOfTopLevelItem(selectedItems[1])
             if index1 > index2:
                 # Swap the entries
-                selectedItems[0], selectedItems[1] = \
+                selectedItems[0], selectedItems[1] = (
                     selectedItems[1], selectedItems[0]
+                )
             html = "{0}<hr/>{1}".format(
                 self.__generateDetailsTableText(selectedItems[0]),
                 self.__generateDetailsTableText(selectedItems[1]),
@@ -1821,8 +1835,10 @@
             res, shouldReopen = self.vcs.gitBranch(
                 self.repodir, revision=commit, branchName=branch,
                 branchOp=GitBranchDialog.CreateSwitchBranch)
-            shouldReopen = shouldReopen or \
+            shouldReopen = (
+                shouldReopen or
                 QFileInfo(pfile).lastModified().toString() != lastModified
+            )
             if res:
                 if shouldReopen:
                     res = E5MessageBox.yesNo(

eric ide

mercurial