src/eric7/Plugins/VcsPlugins/vcsMercurial/GpgExtension/gpg.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9473
3f23dbf37dbe
--- a/src/eric7/Plugins/VcsPlugins/vcsMercurial/GpgExtension/gpg.py	Wed Jul 13 11:16:20 2022 +0200
+++ b/src/eric7/Plugins/VcsPlugins/vcsMercurial/GpgExtension/gpg.py	Wed Jul 13 14:55:47 2022 +0200
@@ -18,36 +18,38 @@
     """
     Class implementing the gpg extension interface.
     """
+
     def __init__(self, vcs):
         """
         Constructor
-        
+
         @param vcs reference to the Mercurial vcs object
         """
         super().__init__(vcs)
-        
+
         self.gpgSignaturesDialog = None
-    
+
     def shutdown(self):
         """
         Public method used to shutdown the gpg interface.
         """
         if self.gpgSignaturesDialog is not None:
             self.gpgSignaturesDialog.close()
-    
+
     def hgGpgSignatures(self):
         """
         Public method used to list all signed changesets.
         """
         from .HgGpgSignaturesDialog import HgGpgSignaturesDialog
+
         self.gpgSignaturesDialog = HgGpgSignaturesDialog(self.vcs)
         self.gpgSignaturesDialog.show()
         self.gpgSignaturesDialog.start()
-    
+
     def hgGpgVerifySignatures(self, rev=None):
         """
         Public method used to verify the signatures of a revision.
-        
+
         @param rev revision to check (string)
         """
         if rev is None:
@@ -55,38 +57,39 @@
                 self.vcs.hgGetTagsList(),
                 self.vcs.hgGetBranchesList(),
                 bookmarksList=self.vcs.hgGetBookmarksList(),
-                revset=False
+                revset=False,
             )
             if dlg.exec() == QDialog.DialogCode.Accepted:
                 rev = dlg.getRevision()
-        
+
         if rev is not None:
             if rev == "":
                 rev = "tip"
             args = self.vcs.initCommand("sigcheck")
             args.append(rev)
-            
-            dia = HgDialog(self.tr('Verify Signatures'), self.vcs)
+
+            dia = HgDialog(self.tr("Verify Signatures"), self.vcs)
             res = dia.startProcess(args)
             if res:
                 dia.exec()
-    
+
     def hgGpgSign(self, revisions=None):
         """
         Public method used to list the available bookmarks.
-        
+
         @param revisions list containing the revisions to be signed
         @type list of str
         """
         if revisions is None:
             from .HgGpgSignDialog import HgGpgSignDialog
-            dlg = HgGpgSignDialog(self.vcs.hgGetTagsList(),
-                                  self.vcs.hgGetBranchesList(),
-                                  self.vcs.hgGetBookmarksList())
+
+            dlg = HgGpgSignDialog(
+                self.vcs.hgGetTagsList(),
+                self.vcs.hgGetBranchesList(),
+                self.vcs.hgGetBookmarksList(),
+            )
             if dlg.exec() == QDialog.DialogCode.Accepted:
-                revision, noCommit, message, keyId, local, force = (
-                    dlg.getData()
-                )
+                revision, noCommit, message, keyId, local, force = dlg.getData()
                 if revision:
                     revisions = [revision]
                 else:
@@ -99,7 +102,7 @@
             keyId = ""
             local = False
             force = False
-        
+
         args = self.vcs.initCommand("sign")
         if noCommit:
             args.append("--no-commit")
@@ -115,8 +118,8 @@
             args.append("--force")
         for rev in revisions:
             args.append(rev)
-        
-        dia = HgDialog(self.tr('Sign Revision'), self.vcs)
+
+        dia = HgDialog(self.tr("Sign Revision"), self.vcs)
         res = dia.startProcess(args)
         if res:
             dia.exec()

eric ide

mercurial