src/eric7/Plugins/WizardPlugins/SetupWizard/AddProjectUrlDialog.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9653
e67609152c5e
--- a/src/eric7/Plugins/WizardPlugins/SetupWizard/AddProjectUrlDialog.py	Wed Jul 13 11:16:20 2022 +0200
+++ b/src/eric7/Plugins/WizardPlugins/SetupWizard/AddProjectUrlDialog.py	Wed Jul 13 14:55:47 2022 +0200
@@ -17,10 +17,11 @@
     """
     Class implementing a dialog to enter the data for a project URL.
     """
+
     def __init__(self, name="", url="", parent=None):
         """
         Constructor
-        
+
         @param name name of the project URL (defaults to "")
         @type str (optional)
         @param url address of the project URL (defaults to "")
@@ -30,48 +31,50 @@
         """
         super().__init__(parent)
         self.setupUi(self)
-        
+
         self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(False)
-        
+
         self.nameComboBox.lineEdit().setClearButtonEnabled(True)
-        self.nameComboBox.addItems([
-            "",
-            "Bug Tracker",
-            "Change Log",
-            "Documentation",
-            "Donation",
-            "Download",
-            "Funding",
-            "Homepage",
-            "Issues Tracker",
-            "News",
-            "Release Notes",
-        ])
-        
+        self.nameComboBox.addItems(
+            [
+                "",
+                "Bug Tracker",
+                "Change Log",
+                "Documentation",
+                "Donation",
+                "Download",
+                "Funding",
+                "Homepage",
+                "Issues Tracker",
+                "News",
+                "Release Notes",
+            ]
+        )
+
         self.nameComboBox.editTextChanged.connect(self.__updateOK)
         self.urlEdit.textChanged.connect(self.__updateOK)
-        
+
         self.nameComboBox.setEditText(name)
         self.urlEdit.setText(url)
-        
+
         msh = self.minimumSizeHint()
         self.resize(max(self.width(), msh.width()), msh.height())
-    
+
     @pyqtSlot()
     def __updateOK(self):
         """
         Private slot to update the enabled state of the OK button.
         """
         self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(
-            bool(self.nameComboBox.currentText()) and
-            bool(self.urlEdit.text()) and
-            self.urlEdit.text().startswith(("http://", "https://"))
+            bool(self.nameComboBox.currentText())
+            and bool(self.urlEdit.text())
+            and self.urlEdit.text().startswith(("http://", "https://"))
         )
-    
+
     def getUrl(self):
         """
         Public method to get the data for the project URL.
-        
+
         @return tuple containing the name and address of the project URL
         @rtype tuple of (str, str)
         """

eric ide

mercurial