src/eric7/EricXML/SpellCheckDictionariesReader.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9413
80c06d472826
--- a/src/eric7/EricXML/SpellCheckDictionariesReader.py	Wed Jul 13 11:16:20 2022 +0200
+++ b/src/eric7/EricXML/SpellCheckDictionariesReader.py	Wed Jul 13 14:55:47 2022 +0200
@@ -17,23 +17,26 @@
     """
     Class to read the web browser spell check dictionaries list file.
     """
-    supportedVersions = ["1.0", ]
-    
+
+    supportedVersions = [
+        "1.0",
+    ]
+
     def __init__(self, data, entryCallback):
         """
         Constructor
-        
+
         @param data reference to the data array to read XML from (QByteArray)
         @param entryCallback reference to a function to be called once the
             data for a dictionary has been read (function)
         """
         XMLStreamReaderBase.__init__(self, data)
-        
+
         self.__entryCallback = entryCallback
-        
+
         self.version = ""
         self.baseUrl = ""
-    
+
     def readXML(self):
         """
         Public method to read and parse the XML document.
@@ -43,8 +46,8 @@
             if self.isStartElement():
                 if self.name() == "Dictionaries":
                     self.version = self.attribute(
-                        "version",
-                        dictionariesListFileFormatVersion)
+                        "version", dictionariesListFileFormatVersion
+                    )
                     self.baseUrl = self.attribute("baseurl", "")
                     if self.version not in self.supportedVersions:
                         self.raiseUnsupportedFormatVersion(self.version)
@@ -55,28 +58,32 @@
                     self.__readDictionary()
                 else:
                     self._skipUnknownElement()
-        
+
         self.showErrorMessage()
-    
+
     def __readDictionary(self):
         """
         Private method to read the plug-in info.
         """
-        dictionaryInfo = {"short": "",
-                          "filename": "",
-                          "documentation": "",
-                          "locales": [],
-                          }
-        
+        dictionaryInfo = {
+            "short": "",
+            "filename": "",
+            "documentation": "",
+            "locales": [],
+        }
+
         while not self.atEnd():
             self.readNext()
             if self.isEndElement() and self.name() == "Dictionary":
                 self.__entryCallback(
-                    dictionaryInfo["short"], dictionaryInfo["filename"],
+                    dictionaryInfo["short"],
+                    dictionaryInfo["filename"],
                     self.baseUrl + dictionaryInfo["filename"],
-                    dictionaryInfo["documentation"], dictionaryInfo["locales"])
+                    dictionaryInfo["documentation"],
+                    dictionaryInfo["locales"],
+                )
                 break
-            
+
             if self.isStartElement():
                 if self.name() == "Short":
                     dictionaryInfo["short"] = self.readElementText()

eric ide

mercurial