src/eric7/QScintilla/SpellCheckingDialog.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9413
80c06d472826
--- a/src/eric7/QScintilla/SpellCheckingDialog.py	Wed Jul 13 11:16:20 2022 +0200
+++ b/src/eric7/QScintilla/SpellCheckingDialog.py	Wed Jul 13 14:55:47 2022 +0200
@@ -19,10 +19,11 @@
     """
     Class implementing the spell checking dialog.
     """
+
     def __init__(self, spellChecker, startPos, endPos, parent=None):
         """
         Constructor
-        
+
         @param spellChecker reference to the spell checker (SpellChecker)
         @param startPos position to start spell checking (integer)
         @param endPos end position for spell checking (integer)
@@ -30,19 +31,18 @@
         """
         super().__init__(parent)
         self.setupUi(self)
-        
+
         self.__spell = spellChecker
-        self.languageLabel.setText(
-            "<b>{0}</b>".format(self.__spell.getLanguage()))
+        self.languageLabel.setText("<b>{0}</b>".format(self.__spell.getLanguage()))
         if not self.__spell.initCheck(startPos, endPos):
             self.__enableButtons(False)
         else:
             self.__advance()
-    
+
     def __enableButtons(self, enable):
         """
         Private method to set the buttons enabled state.
-        
+
         @param enable enable state (boolean)
         """
         self.addButton.setEnabled(enable)
@@ -50,7 +50,7 @@
         self.ignoreAllButton.setEnabled(enable)
         self.replaceButton.setEnabled(enable)
         self.replaceAllButton.setEnabled(enable)
-    
+
     def __advance(self):
         """
         Private method to advance to the next error.
@@ -63,48 +63,49 @@
             self.changeEdit.setText("")
             self.suggestionsList.clear()
             return
-        
+
         self.__enableButtons(True)
         self.word, self.wordStart, self.wordEnd = self.__spell.getError()
-        lcontext, rcontext = self.__spell.getContext(
-            self.wordStart, self.wordEnd)
+        lcontext, rcontext = self.__spell.getContext(self.wordStart, self.wordEnd)
         self.changeEdit.setText(self.word)
         self.contextLabel.setText(
             '{0}<font color="#FF0000">{1}</font>{2}'.format(
                 Utilities.html_encode(lcontext),
                 self.word,
-                Utilities.html_encode(rcontext)))
+                Utilities.html_encode(rcontext),
+            )
+        )
         suggestions = self.__spell.getSuggestions(self.word)
         self.suggestionsList.clear()
         self.suggestionsList.addItems(suggestions)
-    
+
     @pyqtSlot(str)
     def on_changeEdit_textChanged(self, text):
         """
         Private method to handle a change of the replacement text.
-        
+
         @param text contents of the line edit (string)
         """
         self.replaceButton.setEnabled(text != "")
         self.replaceAllButton.setEnabled(text != "")
-    
+
     @pyqtSlot(str)
     def on_suggestionsList_currentTextChanged(self, currentText):
         """
         Private method to handle the selection of a suggestion.
-        
+
         @param currentText the currently selected text (string)
         """
         if currentText:
             self.changeEdit.setText(currentText)
-    
+
     @pyqtSlot()
     def on_ignoreButton_clicked(self):
         """
         Private slot to ignore the found error.
         """
         self.__advance()
-    
+
     @pyqtSlot()
     def on_ignoreAllButton_clicked(self):
         """
@@ -112,7 +113,7 @@
         """
         self.__spell.ignoreAlways()
         self.__advance()
-    
+
     @pyqtSlot()
     def on_addButton_clicked(self):
         """
@@ -120,7 +121,7 @@
         """
         self.__spell.add()
         self.__advance()
-    
+
     @pyqtSlot()
     def on_replaceButton_clicked(self):
         """
@@ -128,7 +129,7 @@
         """
         self.__spell.replace(self.changeEdit.text())
         self.__advance()
-    
+
     @pyqtSlot()
     def on_replaceAllButton_clicked(self):
         """

eric ide

mercurial