wmllint: fixed a bug in spellchecking caused by Python 3 map()
This bug prevented local spelling words from being added to the spellchecking dictionary, and it was caused by the fact that the map iterator was never iterated. Replaced with an explicit for cycle.
This commit is contained in:
parent
4e4fdd0504
commit
889eb5aa7b
1 changed files with 2 additions and 1 deletions
|
@ -2543,7 +2543,8 @@ def spellcheck(fn, d):
|
|||
local_spellings = [w for w in local_spellings if not d.check(w)]
|
||||
#if local_spellings:
|
||||
# print("%s: inherited local spellings: %s" % (fn, local_spellings))
|
||||
map(d.add_to_session, local_spellings)
|
||||
for word in local_spellings:
|
||||
d.add_to_session(word)
|
||||
|
||||
# Process this individual file
|
||||
for nav in WmllintIterator(filename=fn):
|
||||
|
|
Loading…
Add table
Reference in a new issue