take this, pep8

This commit is contained in:
Felix Van der Jeugt 2015-12-19 10:52:02 +01:00
parent fc06283d91
commit aa9e58b520

View File

@ -260,17 +260,18 @@ class HintManager(QObject):
def take_last_part(tag): def take_last_part(tag):
return lambda elem: elem[tag].split('/')[-1] return lambda elem: elem[tag].split('/')[-1]
tag_extractors = dict( tag_extractors = dict(alt=just_get_it("alt"),
alt=just_get_it("alt"),
title=just_get_it("title"), title=just_get_it("title"),
src=take_last_part("src"), src=take_last_part("src"),
href=take_last_part("href"), href=take_last_part("href"),
name=just_get_it("name")) name=just_get_it("name"))
tags_for = collections.defaultdict(list, { tags_for = collections.defaultdict(
list, {
"IMG": ["alt", "title", "src"], "IMG": ["alt", "title", "src"],
"A": ["title", "href"], "A": ["title", "href"],
"INPUT": ["name"]}) "INPUT": ["name"]
})
def extract_tag_words(elem): def extract_tag_words(elem):
"Extract tag words form the given element." "Extract tag words form the given element."