eric6/Plugins/VcsPlugins/vcsPySvn/SvnLogBrowserDialog.py

branch
maintenance
changeset 8273
698ae46f40a4
parent 8176
31965986ecd1
parent 8259
2bbec88047dd
--- a/eric6/Plugins/VcsPlugins/vcsPySvn/SvnLogBrowserDialog.py	Fri Apr 02 11:59:41 2021 +0200
+++ b/eric6/Plugins/VcsPlugins/vcsPySvn/SvnLogBrowserDialog.py	Sat May 01 14:27:20 2021 +0200
@@ -41,7 +41,7 @@
         @param vcs reference to the vcs object
         @param parent parent widget (QWidget)
         """
-        super(SvnLogBrowserDialog, self).__init__(parent)
+        super().__init__(parent)
         self.setupUi(self)
         SvnDialogMixin.__init__(self)
         
@@ -118,7 +118,7 @@
             self.move(self.__position)
         self.__resetUI()
         
-        super(SvnLogBrowserDialog, self).show()
+        super().show()
     
     def __resetUI(self):
         """
@@ -206,10 +206,7 @@
         else:
             rev = revision.number
             self.__lastRev = revision.number
-        if date == "":
-            dt = ""
-        else:
-            dt = formatTime(date)
+        dt = formatTime(date) if date else ""
         
         itm = QTreeWidgetItem(self.logTree)
         itm.setData(0, Qt.ItemDataRole.DisplayRole, rev)
@@ -220,15 +217,16 @@
         
         changes = []
         for changedPath in changedPaths:
-            if changedPath["copyfrom_path"] is None:
-                copyPath = ""
-            else:
-                copyPath = changedPath["copyfrom_path"]
-            if changedPath["copyfrom_revision"] is None:
-                copyRev = ""
-            else:
-                copyRev = "{0:7d}".format(
-                    changedPath["copyfrom_revision"].number)
+            copyPath = (
+                ""
+                if changedPath["copyfrom_path"] is None else
+                changedPath["copyfrom_path"]
+            )
+            copyRev = (
+                ""
+                if changedPath["copyfrom_revision"] is None else
+                "{0:7d}".format(changedPath["copyfrom_revision"].number)
+            )
             change = {
                 "action": changedPath["action"],
                 "path": changedPath["path"],
@@ -295,11 +293,12 @@
                 with E5MutexLocker(self.vcs.vcsExecutionMutex):
                     while fetched < limit:
                         flimit = min(fetchLimit, limit - fetched)
-                        if fetched == 0:
-                            revstart = start
-                        else:
-                            revstart = pysvn.Revision(
-                                pysvn.opt_revision_kind.number, nextRev)
+                        revstart = (
+                            start
+                            if fetched == 0 else
+                            pysvn.Revision(pysvn.opt_revision_kind.number,
+                                           nextRev)
+                        )
                         allLogs = self.client.log(
                             self.fname, revision_start=revstart,
                             discover_changed_paths=True, limit=flimit + 1,

eric ide

mercurial