src/eric7/Debugger/EditBreakpointDialog.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9413
80c06d472826
diff -r e9e7eca7efee -r bf71ee032bb4 src/eric7/Debugger/EditBreakpointDialog.py
--- a/src/eric7/Debugger/EditBreakpointDialog.py	Wed Jul 13 11:16:20 2022 +0200
+++ b/src/eric7/Debugger/EditBreakpointDialog.py	Wed Jul 13 14:55:47 2022 +0200
@@ -20,11 +20,21 @@
     """
     Class implementing a dialog to edit breakpoint properties.
     """
-    def __init__(self, breakPointId, properties, condHistory, parent=None,
-                 name=None, modal=False, addMode=False, filenameHistory=None):
+
+    def __init__(
+        self,
+        breakPointId,
+        properties,
+        condHistory,
+        parent=None,
+        name=None,
+        modal=False,
+        addMode=False,
+        filenameHistory=None,
+    ):
         """
         Constructor
-        
+
         @param breakPointId id of the breakpoint (tuple)
                 (filename, linenumber)
         @param properties properties for the breakpoint (tuple)
@@ -42,29 +52,29 @@
         if name:
             self.setObjectName(name)
         self.setModal(modal)
-        
+
         self.filenamePicker.setMode(EricPathPickerModes.OPEN_FILE_MODE)
         self.filenamePicker.setSizeAdjustPolicy(
-            QComboBox.SizeAdjustPolicy.AdjustToMinimumContentsLengthWithIcon)
-        
-        self.okButton = self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Ok)
-        
+            QComboBox.SizeAdjustPolicy.AdjustToMinimumContentsLengthWithIcon
+        )
+
+        self.okButton = self.buttonBox.button(QDialogButtonBox.StandardButton.Ok)
+
         fn, lineno = breakPointId
-        
+
         if not addMode:
             cond, temp, enabled, count = properties
-            
+
             # set the filename
             if fn is not None:
                 self.filenamePicker.setEditText(fn)
-            
+
             # set the line number
             self.linenoSpinBox.setValue(lineno)
-            
+
             # set the condition
             if cond is None:
-                cond = ''
+                cond = ""
             try:
                 curr = condHistory.index(cond)
             except ValueError:
@@ -72,14 +82,14 @@
                 curr = 0
             self.conditionCombo.addItems(condHistory)
             self.conditionCombo.setCurrentIndex(curr)
-            
+
             # set the ignore count
             self.ignoreSpinBox.setValue(count)
-            
+
             # set the checkboxes
             self.temporaryCheckBox.setChecked(temp)
             self.enabledCheckBox.setChecked(enabled)
-            
+
             self.filenamePicker.setEnabled(False)
             self.linenoSpinBox.setEnabled(False)
             self.conditionCombo.setFocus()
@@ -95,9 +105,9 @@
                 curr = 0
             self.filenamePicker.addItems(filenameHistory)
             self.filenamePicker.setCurrentIndex(curr)
-            
+
             # set the condition
-            cond = ''
+            cond = ""
             try:
                 curr = condHistory.index(cond)
             except ValueError:
@@ -105,48 +115,54 @@
                 curr = 0
             self.conditionCombo.addItems(condHistory)
             self.conditionCombo.setCurrentIndex(curr)
-            
+
             if not fn:
                 self.okButton.setEnabled(False)
-        
+
         msh = self.minimumSizeHint()
         self.resize(max(self.width(), msh.width()), msh.height())
-        
+
     def on_filenamePicker_editTextChanged(self, fn):
         """
         Private slot to handle the change of the filename.
-        
+
         @param fn text of the filename edit (string)
         """
         if not fn:
             self.okButton.setEnabled(False)
         else:
             self.okButton.setEnabled(True)
-        
+
     def getData(self):
         """
         Public method to retrieve the entered data.
-        
+
         @return a tuple containing the breakpoints new properties
             (condition, temporary flag, enabled flag, ignore count)
         """
-        return (self.conditionCombo.currentText(),
-                self.temporaryCheckBox.isChecked(),
-                self.enabledCheckBox.isChecked(), self.ignoreSpinBox.value())
-        
+        return (
+            self.conditionCombo.currentText(),
+            self.temporaryCheckBox.isChecked(),
+            self.enabledCheckBox.isChecked(),
+            self.ignoreSpinBox.value(),
+        )
+
     def getAddData(self):
         """
         Public method to retrieve the entered data for an add.
-        
+
         @return a tuple containing the new breakpoints properties
             (filename, lineno, condition, temporary flag, enabled flag,
             ignore count)
         """
         fn = self.filenamePicker.currentText()
         fn = os.path.expanduser(os.path.expandvars(fn)) if fn else None
-        
-        return (fn, self.linenoSpinBox.value(),
-                self.conditionCombo.currentText(),
-                self.temporaryCheckBox.isChecked(),
-                self.enabledCheckBox.isChecked(),
-                self.ignoreSpinBox.value())
+
+        return (
+            fn,
+            self.linenoSpinBox.value(),
+            self.conditionCombo.currentText(),
+            self.temporaryCheckBox.isChecked(),
+            self.enabledCheckBox.isChecked(),
+            self.ignoreSpinBox.value(),
+        )

eric ide

mercurial