src/eric7/Project/NewDialogClassDialog.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9413
80c06d472826
diff -r e9e7eca7efee -r bf71ee032bb4 src/eric7/Project/NewDialogClassDialog.py
--- a/src/eric7/Project/NewDialogClassDialog.py	Wed Jul 13 11:16:20 2022 +0200
+++ b/src/eric7/Project/NewDialogClassDialog.py	Wed Jul 13 14:55:47 2022 +0200
@@ -20,11 +20,11 @@
     """
     Class implementing a dialog to ente the data for a new dialog class file.
     """
-    def __init__(self, defaultClassName, defaultFile, defaultPath,
-                 parent=None):
+
+    def __init__(self, defaultClassName, defaultFile, defaultPath, parent=None):
         """
         Constructor
-        
+
         @param defaultClassName proposed name for the new class (string)
         @param defaultFile proposed name for the source file (string)
         @param defaultPath default path for the new file (string)
@@ -32,61 +32,60 @@
         """
         super().__init__(parent)
         self.setupUi(self)
-        
+
         self.pathnamePicker.setMode(EricPathPickerModes.DIRECTORY_MODE)
-        
-        self.okButton = self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Ok)
+
+        self.okButton = self.buttonBox.button(QDialogButtonBox.StandardButton.Ok)
         self.okButton.setEnabled(False)
-        
+
         self.classnameEdit.setText(defaultClassName)
         self.filenameEdit.setText(defaultFile)
         self.pathnamePicker.setText(defaultPath)
-        
+
         msh = self.minimumSizeHint()
         self.resize(max(self.width(), msh.width()), msh.height())
-        
+
     def __enableOkButton(self):
         """
         Private slot to set the enable state of theok button.
         """
         self.okButton.setEnabled(
-            self.classnameEdit.text() != "" and
-            self.filenameEdit.text() != "" and
-            self.pathnamePicker.text() != "")
-        
+            self.classnameEdit.text() != ""
+            and self.filenameEdit.text() != ""
+            and self.pathnamePicker.text() != ""
+        )
+
     def on_classnameEdit_textChanged(self, text):
         """
         Private slot called, when thext of the classname edit has changed.
-        
+
         @param text changed text (string)
         """
         self.__enableOkButton()
-        
+
     def on_filenameEdit_textChanged(self, text):
         """
         Private slot called, when thext of the filename edit has changed.
-        
+
         @param text changed text (string)
         """
         self.__enableOkButton()
-        
+
     def on_pathnamePicker_textChanged(self, text):
         """
         Private slot called, when the text of the path name has changed.
-        
+
         @param text changed text (string)
         """
         self.__enableOkButton()
-        
+
     def getData(self):
         """
         Public method to retrieve the data entered into the dialog.
-        
+
         @return tuple giving the classname (string) and the file name (string)
         """
         return (
             self.classnameEdit.text(),
-            os.path.join(self.pathnamePicker.text(),
-                         self.filenameEdit.text())
+            os.path.join(self.pathnamePicker.text(), self.filenameEdit.text()),
         )

eric ide

mercurial