src/eric7/Plugins/VcsPlugins/vcsMercurial/HgBundleDialog.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9653
e67609152c5e
--- a/src/eric7/Plugins/VcsPlugins/vcsMercurial/HgBundleDialog.py	Wed Jul 13 11:16:20 2022 +0200
+++ b/src/eric7/Plugins/VcsPlugins/vcsMercurial/HgBundleDialog.py	Wed Jul 13 14:55:47 2022 +0200
@@ -17,11 +17,13 @@
     """
     Class implementing a dialog to enter the data for a bundle operation.
     """
-    def __init__(self, tagsList, branchesList, bookmarksList=None,
-                 version=(0, 0, 0), parent=None):
+
+    def __init__(
+        self, tagsList, branchesList, bookmarksList=None, version=(0, 0, 0), parent=None
+    ):
         """
         Constructor
-        
+
         @param tagsList list of tags
         @type list of str
         @param branchesList list of branches
@@ -35,12 +37,11 @@
         """
         super().__init__(parent)
         self.setupUi(self)
-        
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Ok).setEnabled(False)
-        
+
+        self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(False)
+
         self.__version = version
-        
+
         bundleTypes = ["", "bzip2", "gzip", "none"]
         if version >= (4, 1, 0):
             bundleTypes.insert(-1, "zstd")
@@ -52,7 +53,7 @@
         else:
             self.bookmarkButton.setHidden(True)
             self.bookmarkCombo.setHidden(True)
-    
+
     def __updateOK(self):
         """
         Private slot to update the OK button.
@@ -66,92 +67,93 @@
             enabled = self.branchCombo.currentText() != ""
         elif self.bookmarkButton.isChecked():
             enabled = self.bookmarkCombo.currentText() != ""
-        
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Ok).setEnabled(enabled)
-    
+
+        self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(enabled)
+
     @pyqtSlot(bool)
     def on_multipleButton_toggled(self, checked):
         """
         Private slot to handle changes of the Multiple select button.
-        
+
         @param checked state of the button (boolean)
         """
         self.__updateOK()
-    
+
     @pyqtSlot(bool)
     def on_tagButton_toggled(self, checked):
         """
         Private slot to handle changes of the Tag select button.
-        
+
         @param checked state of the button (boolean)
         """
         self.__updateOK()
-    
+
     @pyqtSlot(bool)
     def on_branchButton_toggled(self, checked):
         """
         Private slot to handle changes of the Branch select button.
-        
+
         @param checked state of the button (boolean)
         """
         self.__updateOK()
-    
+
     @pyqtSlot(bool)
     def on_bookmarkButton_toggled(self, checked):
         """
         Private slot to handle changes of the Bookmark select button.
-        
+
         @param checked state of the button (boolean)
         """
         self.__updateOK()
-    
+
     @pyqtSlot()
     def on_multipleEdit_textChanged(self):
         """
         Private slot to handle changes of the Multiple edit.
         """
         self.__updateOK()
-    
+
     @pyqtSlot(str)
     def on_tagCombo_editTextChanged(self, txt):
         """
         Private slot to handle changes of the Tag combo.
-        
+
         @param txt text of the combo (string)
         """
         self.__updateOK()
-    
+
     @pyqtSlot(str)
     def on_branchCombo_editTextChanged(self, txt):
         """
         Private slot to handle changes of the Branch combo.
-        
+
         @param txt text of the combo (string)
         """
         self.__updateOK()
-    
+
     @pyqtSlot(str)
     def on_bookmarkCombo_editTextChanged(self, txt):
         """
         Private slot to handle changes of the Bookmark combo.
-        
+
         @param txt text of the combo (string)
         """
         self.__updateOK()
-    
+
     def getParameters(self):
         """
         Public method to retrieve the bundle data.
-        
+
         @return tuple naming the revisions, base revisions, the compression
             type and a flag indicating to bundle all changesets (string,
             string, boolean)
         """
         if self.multipleButton.isChecked():
-            revs = [rev.strip() for rev in
-                    self.multipleEdit.toPlainText().strip().splitlines()
-                    if rev.strip()]
+            revs = [
+                rev.strip()
+                for rev in self.multipleEdit.toPlainText().strip().splitlines()
+                if rev.strip()
+            ]
         elif self.tagButton.isChecked():
             revs = [self.tagCombo.currentText()]
         elif self.branchButton.isChecked():
@@ -160,13 +162,15 @@
             revs = [self.bookmarkCombo.currentText()]
         else:
             revs = []
-        
-        baseRevs = [rev.strip() for rev in
-                    self.baseRevisionsEdit.toPlainText().strip().splitlines()
-                    if rev.strip()]
-        
+
+        baseRevs = [
+            rev.strip()
+            for rev in self.baseRevisionsEdit.toPlainText().strip().splitlines()
+            if rev.strip()
+        ]
+
         bundleType = self.compressionCombo.currentText()
         if bundleType == "zstd":
             bundleType += "-v2"
-        
+
         return (revs, baseRevs, bundleType, self.allCheckBox.isChecked())

eric ide

mercurial