eric6/Plugins/VcsPlugins/vcsGit/git.py

changeset 7257
c4d0cac9b5c9
parent 7229
53054eb5b15a
child 7360
9190402e4505
--- a/eric6/Plugins/VcsPlugins/vcsGit/git.py	Sat Sep 21 20:30:56 2019 +0200
+++ b/eric6/Plugins/VcsPlugins/vcsGit/git.py	Sat Sep 21 22:03:03 2019 +0200
@@ -204,8 +204,8 @@
             else:
                 if finished:
                     errMsg = self.tr(
-                        "The git process finished with the exit code {0}")\
-                        .format(process.exitCode())
+                        "The git process finished with the exit code {0}"
+                    ).format(process.exitCode())
                 else:
                     errMsg = self.tr(
                         "The git process did not finish within 30s.")
@@ -407,14 +407,16 @@
                 if os.path.isdir(nam):
                     project = e5App().getObject("Project")
                     if nam == project.getProjectPath():
-                        ok &= \
+                        ok &= (
                             project.checkAllScriptsDirty(
-                                reportSyntaxErrors=True) and \
+                                reportSyntaxErrors=True) and
                             project.checkDirty()
+                        )
                         continue
                 elif os.path.isfile(nam):
-                    editor = \
+                    editor = (
                         e5App().getObject("ViewManager").getOpenEditor(nam)
+                    )
                     if editor:
                         ok &= editor.checkDirty()
                 if not ok:
@@ -875,8 +877,9 @@
         project = e5App().getObject("Project")
         names = [project.getRelativePath(nam) for nam in names]
         if names[0]:
-            from UI.DeleteFilesConfirmationDialog import \
+            from UI.DeleteFilesConfirmationDialog import (
                 DeleteFilesConfirmationDialog
+            )
             dlg = DeleteFilesConfirmationDialog(
                 self.parent(),
                 self.tr("Revert changes"),
@@ -924,8 +927,9 @@
                              self.gitGetCurrentBranch(repodir),
                              self.gitGetBranchesList(repodir, remotes=True))
         if dlg.exec_() == QDialog.Accepted:
-            commit, doCommit, commitMessage, addLog, diffStat = \
+            commit, doCommit, commitMessage, addLog, diffStat = (
                 dlg.getParameters()
+            )
             args = self.initCommand("merge")
             if doCommit:
                 args.append("--commit")
@@ -1274,8 +1278,9 @@
         if output:
             info = []
             (commit, parents, author, authorMail, authorDate,
-             committer, committerMail, committerDate, refs, subject) = \
+             committer, committerMail, committerDate, refs, subject) = (
                 output.splitlines()
+            )
             tags = []
             branches = []
             for name in refs.strip()[1:-1].split(","):
@@ -1589,8 +1594,9 @@
                 if os.path.splitdrive(repodir)[1] == os.sep:
                     return
             
-            from .GitRevisionsSelectionDialog import \
+            from .GitRevisionsSelectionDialog import (
                 GitRevisionsSelectionDialog
+            )
             dlg = GitRevisionsSelectionDialog(self.gitGetTagsList(repodir),
                                               self.gitGetBranchesList(repodir))
             if dlg.exec_() == QDialog.Accepted:
@@ -2131,8 +2137,9 @@
             self.gitGetBranchesList(repodir, allBranches=True),
             revision, branchName, branchOp)
         if dlg.exec_() == QDialog.Accepted:
-            branchOp, branch, revision, newBranch, remoteBranch, force = \
+            branchOp, branch, revision, newBranch, remoteBranch, force = (
                 dlg.getParameters()
+            )
         else:
             return False, False
         
@@ -2793,8 +2800,10 @@
             for line in output.splitlines():
                 name, urlmode = line.strip().split(None, 1)
                 url, mode = urlmode.rsplit(None, 1)
-                if forFetch and mode == "(fetch)" or \
-                        (not forFetch) and mode == "(push)":
+                if (
+                    (forFetch and mode == "(fetch)") or
+                    ((not forFetch) and mode == "(push)")
+                ):
                     remotesList.append((name, url))
         
         return remotesList
@@ -2890,8 +2899,9 @@
         @param projectDir name of the project directory (string)
         """
         if self.remotesDialog is None:
-            from .GitRemoteRepositoriesDialog import \
+            from .GitRemoteRepositoriesDialog import (
                 GitRemoteRepositoriesDialog
+            )
             self.remotesDialog = GitRemoteRepositoriesDialog(self)
         self.remotesDialog.show()
         self.remotesDialog.raise_()
@@ -3126,8 +3136,9 @@
         from .GitCherryPickDialog import GitCherryPickDialog
         dlg = GitCherryPickDialog(commits)
         if dlg.exec_() == QDialog.Accepted:
-            commits, cherrypickInfo, signoff, nocommit = \
+            commits, cherrypickInfo, signoff, nocommit = (
                 dlg.getData()
+            )
             
             args = self.initCommand("cherry-pick")
             args.append("-Xpatience")
@@ -4090,12 +4101,14 @@
         paths = [submodule["path"]
                  for submodule in self.__gitSubmodulesList(repodir)]
         
-        from .GitSubmodulesUpdateOptionsDialog import \
+        from .GitSubmodulesUpdateOptionsDialog import (
             GitSubmodulesUpdateOptionsDialog
+        )
         dlg = GitSubmodulesUpdateOptionsDialog(paths)
         if dlg.exec_() == QDialog.Accepted:
-            procedure, init, remote, noFetch, force, submodulePaths = \
+            procedure, init, remote, noFetch, force, submodulePaths = (
                 dlg.getData()
+            )
             
             args = self.initCommand("submodule")
             args.append("update")
@@ -4182,8 +4195,9 @@
         paths = [submodule["path"]
                  for submodule in self.__gitSubmodulesList(repodir)]
         
-        from .GitSubmodulesSummaryOptionsDialog import \
+        from .GitSubmodulesSummaryOptionsDialog import (
             GitSubmodulesSummaryOptionsDialog
+        )
         dlg = GitSubmodulesSummaryOptionsDialog(paths)
         if dlg.exec_() == QDialog.Accepted:
             submodulePaths, superProject, index, commit, limit = dlg.getData()

eric ide

mercurial