src/eric7/Project/SpellingPropertiesDialog.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9413
80c06d472826
diff -r e9e7eca7efee -r bf71ee032bb4 src/eric7/Project/SpellingPropertiesDialog.py
--- a/src/eric7/Project/SpellingPropertiesDialog.py	Wed Jul 13 11:16:20 2022 +0200
+++ b/src/eric7/Project/SpellingPropertiesDialog.py	Wed Jul 13 14:55:47 2022 +0200
@@ -20,47 +20,45 @@
     """
     Class implementing the Spelling Properties dialog.
     """
+
     def __init__(self, project, new, parent):
         """
         Constructor
-        
+
         @param project reference to the project object
         @param new flag indicating the generation of a new project
         @param parent parent widget of this dialog (QWidget)
         """
         super().__init__(parent)
         self.setupUi(self)
-        
+
         self.pwlPicker.setMode(EricPathPickerModes.SAVE_FILE_MODE)
         self.pwlPicker.setDefaultDirectory(project.ppath)
-        self.pwlPicker.setFilters(self.tr(
-            "Dictionary File (*.dic);;All Files (*)"))
-        
+        self.pwlPicker.setFilters(self.tr("Dictionary File (*.dic);;All Files (*)"))
+
         self.pelPicker.setMode(EricPathPickerModes.SAVE_FILE_MODE)
         self.pelPicker.setDefaultDirectory(project.ppath)
-        self.pelPicker.setFilters(self.tr(
-            "Dictionary File (*.dic);;All Files (*)"))
-        
+        self.pelPicker.setFilters(self.tr("Dictionary File (*.dic);;All Files (*)"))
+
         self.project = project
         self.parent = parent
-        
+
         from QScintilla.SpellChecker import SpellChecker
+
         self.spellingComboBox.addItem(self.tr("<default>"))
-        self.spellingComboBox.addItems(
-            sorted(SpellChecker.getAvailableLanguages()))
-        
+        self.spellingComboBox.addItems(sorted(SpellChecker.getAvailableLanguages()))
+
         if not new:
             self.initDialog()
-        
+
         msh = self.minimumSizeHint()
         self.resize(max(self.width(), msh.width()), msh.height())
-    
+
     def initDialog(self):
         """
         Public method to initialize the dialogs data.
         """
-        index = self.spellingComboBox.findText(
-            self.project.pdata["SPELLLANGUAGE"])
+        index = self.spellingComboBox.findText(self.project.pdata["SPELLLANGUAGE"])
         if index == -1:
             index = 0
         self.spellingComboBox.setCurrentIndex(index)
@@ -68,20 +66,20 @@
             self.pwlPicker.setText(self.project.pdata["SPELLWORDS"])
         if self.project.pdata["SPELLEXCLUDES"]:
             self.pelPicker.setText(self.project.pdata["SPELLEXCLUDES"])
-    
+
     def storeData(self):
         """
         Public method to store the entered/modified data.
         """
         if self.spellingComboBox.currentIndex() == 0:
-            self.project.pdata["SPELLLANGUAGE"] = (
-                Preferences.getEditor("SpellCheckingDefaultLanguage")
+            self.project.pdata["SPELLLANGUAGE"] = Preferences.getEditor(
+                "SpellCheckingDefaultLanguage"
             )
         else:
-            self.project.pdata["SPELLLANGUAGE"] = (
-                self.spellingComboBox.currentText()
-            )
+            self.project.pdata["SPELLLANGUAGE"] = self.spellingComboBox.currentText()
         self.project.pdata["SPELLWORDS"] = self.project.getRelativePath(
-            self.pwlPicker.text())
+            self.pwlPicker.text()
+        )
         self.project.pdata["SPELLEXCLUDES"] = self.project.getRelativePath(
-            self.pelPicker.text())
+            self.pelPicker.text()
+        )

eric ide

mercurial