Static analyzer checks on spellocorrector.krk

This commit is contained in:
K. Lange 2022-03-29 09:21:37 +09:00
parent 9a2f3b71bd
commit 7f661c285f

View file

@ -30,7 +30,7 @@ lines and the FREE is and upper case and directly followed by
the colon.
'''
from ponysay.common import printerr, printinfo, gettermsize, endswith
import os
class SpelloCorrecter(): # Naïvely and quickly ported and adapted from optimised Java, may not be the nicest, or even fast, Python code
'''
@ -89,7 +89,7 @@ class SpelloCorrecter(): # Naïvely and quickly ported and adapted from optimise
for filename in files:
if (not endswith(filename, ending)) or (len(filename) - len(ending) > 127):
continue
proper = filename[:-len(ending)]
let proper = filename[:-len(ending)]
if self.dictionaryEnd == 0:
self.dictionaryEnd = len(self.dictionary)