Fixed pycodestyle E231 errors

This commit is contained in:
Veronica K. B. Olsen
2020-08-12 20:51:22 +02:00
parent 28ab689dab
commit 95ee2bf874
25 changed files with 162 additions and 162 deletions
+5 -5
View File
@@ -75,7 +75,7 @@ class NWSpellCheck():
newWord = newWord.strip()
self.PROJW.append(newWord)
try:
with open(self.projectDict,mode="a+",encoding="utf-8") as outFile:
with open(self.projectDict, mode="a+", encoding="utf-8") as outFile:
outFile.write("%s\n" % newWord)
except Exception as e:
logger.error("Failed to add word to project word list %s" % str(self.projectDict))
@@ -231,9 +231,9 @@ class NWSpellSimple(NWSpellCheck):
"""Load a dictionary as a list from the app assets folder.
"""
self.WORDS = []
dictFile = path.join(self.mainConf.dictPath,theLang+".dict")
dictFile = path.join(self.mainConf.dictPath, theLang+".dict")
try:
with open(dictFile,mode="r",encoding="utf-8") as wordsFile:
with open(dictFile, mode="r", encoding="utf-8") as wordsFile:
for theLine in wordsFile:
if len(theLine) == 0 or theLine.startswith("#"):
continue
@@ -258,7 +258,7 @@ class NWSpellSimple(NWSpellCheck):
this function as fast as possible as it is called for every
word by the syntax highlighter.
"""
theWord = theWord.replace(self.mainConf.fmtApostrophe,"'").lower()
theWord = theWord.replace(self.mainConf.fmtApostrophe, "'").lower()
return theWord in self.WORDS
def suggestWords(self, theWord):
@@ -282,7 +282,7 @@ class NWSpellSimple(NWSpellCheck):
continue
if firstUp:
aWord = aWord[0].upper() + aWord[1:]
aWord = aWord.replace("'",self.mainConf.fmtApostrophe)
aWord = aWord.replace("'", self.mainConf.fmtApostrophe)
theOptions.append(aWord)
return theOptions