Format everything to pep8 guidelines
This commit is contained in:
parent
cd4b65de3d
commit
99fe34a0b1
33 changed files with 142 additions and 107 deletions
|
@ -20,8 +20,7 @@ def googleimage(inp):
|
|||
raise IOError('error searching for images: {}: {}'.format(parsed['responseStatus'], ''))
|
||||
if not parsed['responseData']['results']:
|
||||
return 'no images found'
|
||||
return random.choice(parsed['responseData']['results'][:10]) \
|
||||
['unescapedUrl']
|
||||
return random.choice(parsed['responseData']['results'][:10])['unescapedUrl']
|
||||
|
||||
|
||||
@hook.command('search')
|
||||
|
@ -48,4 +47,4 @@ def google(inp):
|
|||
content = http.html.fromstring(content).text_content()
|
||||
content = text.truncate_str(content, 150)
|
||||
|
||||
return u'{} -- \x02{}\x02: "{}"'.format(result['unescapedUrl'], title, content)
|
||||
return u'{} -- \x02{}\x02: "{}"'.format(result['unescapedUrl'], title, content)
|
||||
|
|
Reference in a new issue