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:
Elvish_Hunter 2015-08-06 23:13:47 +02:00
parent 4e4fdd0504
commit 889eb5aa7b

View file

@ -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):