take this, pep8
This commit is contained in:
parent
fc06283d91
commit
aa9e58b520
@ -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."
|
||||||
|
Loading…
Reference in New Issue
Block a user