Flake8 and Twitter corrections

Lots of Flake8 corrections
Maybe we should change the rule to allow lines of 120 chars. It seems more usable.

Big twitter correction : now it outputs the words in right order...
This commit is contained in:
Cqoicebordel 2014-12-29 21:31:04 +01:00
parent 576fdef440
commit 5d977056f7
13 changed files with 80 additions and 47 deletions

View file

@ -31,15 +31,22 @@ def request(query, params):
# get response from search-request
def response(resp):
results = []
search_results = loads(resp.text)
# parse results
for result in search_results['results']:
href = result['url']
title = "[" + result['type'] + "] " + result['namespace'] + " " + result['name']
content = '<span class="highlight">[' + result['type'] + "] " + result['name'] + " " + result['synopsis'] + "</span><br />" + result['description']
title = "[" + result['type'] + "] " +\
result['namespace'] +\
" " + result['name']
content = '<span class="highlight">[' +\
result['type'] + "] " +\
result['name'] + " " +\
result['synopsis'] +\
"</span><br />" +\
result['description']
# append result
results.append({'url': href,
'title': title,