src/eric7/QScintilla/SpellingDictionaryEditDialog.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9473
3f23dbf37dbe
--- a/src/eric7/QScintilla/SpellingDictionaryEditDialog.py	Wed Jul 13 11:16:20 2022 +0200
+++ b/src/eric7/QScintilla/SpellingDictionaryEditDialog.py	Wed Jul 13 14:55:47 2022 +0200
@@ -20,51 +20,52 @@
     Class implementing a dialog to edit the various spell checking
     dictionaries.
     """
+
     def __init__(self, data, info, parent=None):
         """
         Constructor
-        
+
         @param data contents to be edited (string)
         @param info info string to show at the header (string)
         @param parent reference to the parent widget (QWidget)
         """
         super().__init__(parent)
         self.setupUi(self)
-        
+
         self.infoLabel.setText(info)
-        
+
         self.__model = QStringListModel(
-            [line.strip() for line in data.splitlines() if line.strip()],
-            self)
+            [line.strip() for line in data.splitlines() if line.strip()], self
+        )
         self.__model.sort(0)
         self.__proxyModel = QSortFilterProxyModel(self)
-        self.__proxyModel.setFilterCaseSensitivity(
-            Qt.CaseSensitivity.CaseInsensitive)
+        self.__proxyModel.setFilterCaseSensitivity(Qt.CaseSensitivity.CaseInsensitive)
         self.__proxyModel.setDynamicSortFilter(True)
         self.__proxyModel.setSourceModel(self.__model)
         self.wordList.setModel(self.__proxyModel)
-        
-        self.searchEdit.textChanged.connect(
-            self.__proxyModel.setFilterFixedString)
-        
+
+        self.searchEdit.textChanged.connect(self.__proxyModel.setFilterFixedString)
+
         self.removeButton.clicked.connect(self.wordList.removeSelected)
         self.removeAllButton.clicked.connect(self.wordList.removeAll)
-    
+
     @pyqtSlot()
     def on_addButton_clicked(self):
         """
         Private slot to handle adding an entry.
         """
         self.__model.insertRow(self.__model.rowCount())
-        self.wordList.edit(
-            self.__proxyModel.index(self.__model.rowCount() - 1, 0))
-    
+        self.wordList.edit(self.__proxyModel.index(self.__model.rowCount() - 1, 0))
+
     def getData(self):
         """
         Public method to get the data.
-        
+
         @return data of the dialog (string)
         """
-        return os.linesep.join(
-            [line.strip() for line in self.__model.stringList()
-             if line.strip()]) + os.linesep
+        return (
+            os.linesep.join(
+                [line.strip() for line in self.__model.stringList() if line.strip()]
+            )
+            + os.linesep
+        )

eric ide

mercurial