RefactoringRope/ConfirmationDialog.py

branch
eric7
changeset 389
4f53795beff0
parent 374
958f34e97952
child 396
933b8fcd854f
--- a/RefactoringRope/ConfirmationDialog.py	Sat Jun 25 18:06:56 2022 +0200
+++ b/RefactoringRope/ConfirmationDialog.py	Wed Sep 21 15:30:34 2022 +0200
@@ -20,11 +20,13 @@
     """
     Class implementing the Confirmation dialog.
     """
-    def __init__(self, refactoring, title, changeGroupName, method, parameters,
-                 parent=None):
+
+    def __init__(
+        self, refactoring, title, changeGroupName, method, parameters, parent=None
+    ):
         """
         Constructor
-        
+
         @param refactoring reference to the main refactoring object
         @type RefactoringServer
         @param title title of the dialog
@@ -40,48 +42,50 @@
         """
         RefactoringDialogBase.__init__(self, refactoring, title, parent)
         self.setupUi(self)
-        
+
         self._changeGroupName = changeGroupName
-        
-        self.__okButton = self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Ok)
+
+        self.__okButton = self.buttonBox.button(QDialogButtonBox.StandardButton.Ok)
         self.__previewButton = self.buttonBox.addButton(
-            self.tr("Preview"), QDialogButtonBox.ButtonRole.ActionRole)
+            self.tr("Preview"), QDialogButtonBox.ButtonRole.ActionRole
+        )
         self.__previewButton.setDefault(True)
-        
+
         self.__method = method
         self.__parameters = parameters
-        
+
         self._calculateChanges()
-    
+
     def __processChangeDescription(self, data):
         """
         Private method to process the change description data sent by the
         refactoring client in order to polish the dialog.
-        
+
         @param data dictionary containing the data
         @type dict
         """
         changeDescription = data["Description"]
         if changeDescription:
             self.description.setText(
-                self.tr("Shall the refactoring <b>{0}</b> be done?")
-                    .format(Utilities.html_encode(changeDescription)))
+                self.tr("Shall the refactoring <b>{0}</b> be done?").format(
+                    Utilities.html_encode(changeDescription)
+                )
+            )
         else:
             self.description.setText(
-                self.tr("The selected refactoring did not produce any"
-                        " changes."))
+                self.tr("The selected refactoring did not produce any" " changes.")
+            )
             self.__okButton.setEnabled(False)
             self.__previewButton.setEnabled(False)
-        
+
         msh = self.minimumSizeHint()
         self.resize(max(self.width(), msh.width()), msh.height())
-    
+
     @pyqtSlot(QAbstractButton)
     def on_buttonBox_clicked(self, button):
         """
         Private slot to act on the button pressed.
-        
+
         @param button reference to the button pressed
         @type QAbstractButton
         """
@@ -89,7 +93,7 @@
             self.requestPreview()
         elif button == self.__okButton:
             self.applyChanges()
-    
+
     def _calculateChanges(self):
         """
         Protected method to initiate the calculation of the changes.
@@ -98,14 +102,14 @@
             self.__parameters["ChangeGroup"] = self._changeGroupName
         if "Title" not in self.__parameters:
             self.__parameters["Title"] = self._title
-        
+
         self._refactoring.sendJson(self.__method, self.__parameters)
-    
+
     def processChangeData(self, data):
         """
         Public method to process the change data sent by the refactoring
         client.
-        
+
         @param data dictionary containing the change data
         @type dict
         """

eric ide

mercurial