auto hinter: Prune some duplicates earlier

The same item can re-appear multiple times in one iteration, so prune
duplicates in each iteration.

Signed-off-by: Niels Thykier <niels@thykier.net>
master
Niels Thykier 9 years ago
parent 463d1a67d9
commit 43266ee091

@ -2919,9 +2919,9 @@ class Britney(object):
for item, ver in items: for item, ver in items:
# excuses which depend on "item" or are depended on by it # excuses which depend on "item" or are depended on by it
new_items = [(x, excuses[x].ver[1]) for x in valid_excuses if \ new_items = set((x, excuses[x].ver[1]) for x in valid_excuses if
(item in excuses_deps[x] or x in excuses_deps[item]) \ (item in excuses_deps[x] or x in excuses_deps[item]) and
and (x, excuses[x].ver[1]) not in seen_items] (x, excuses[x].ver[1]) not in seen_items)
items.extend(new_items) items.extend(new_items)
seen_items.update(new_items) seen_items.update(new_items)

Loading…
Cancel
Save