src/eric7/UI/DeleteFilesConfirmationDialog.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9653
e67609152c5e
--- a/src/eric7/UI/DeleteFilesConfirmationDialog.py	Wed Jul 13 11:16:20 2022 +0200
+++ b/src/eric7/UI/DeleteFilesConfirmationDialog.py	Wed Jul 13 14:55:47 2022 +0200
@@ -16,10 +16,11 @@
     """
     Class implementing a dialog to confirm deletion of multiple files.
     """
+
     def __init__(self, parent, caption, message, files):
         """
         Constructor
-        
+
         @param parent parent of this dialog (QWidget)
         @param caption window title for the dialog (string)
         @param message message to be shown (string)
@@ -28,30 +29,23 @@
         super().__init__(parent)
         self.setupUi(self)
         self.setModal(True)
-        
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Yes).setAutoDefault(False)
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.No).setDefault(True)
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.No).setFocus()
-        
+
+        self.buttonBox.button(QDialogButtonBox.StandardButton.Yes).setAutoDefault(False)
+        self.buttonBox.button(QDialogButtonBox.StandardButton.No).setDefault(True)
+        self.buttonBox.button(QDialogButtonBox.StandardButton.No).setFocus()
+
         self.setWindowTitle(caption)
         self.message.setText(message)
-        
+
         self.filesList.addItems(files)
 
     def on_buttonBox_clicked(self, button):
         """
         Private slot called by a button of the button box clicked.
-        
+
         @param button button that was clicked (QAbstractButton)
         """
-        if button == self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Yes
-        ):
+        if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Yes):
             self.accept()
-        elif button == self.buttonBox.button(
-            QDialogButtonBox.StandardButton.No
-        ):
+        elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.No):
             self.reject()

eric ide

mercurial