[enh] removed missing params; [fix] pep8

This commit is contained in:
potato 2016-09-06 14:24:08 +02:00
parent bc806bfab1
commit 7bf1013c15

View File

@ -26,6 +26,7 @@ def is_valid_lang(lang):
return (True, l[1].lower())
return False
def request(query, params):
m = parser_re.match(unicode(query, 'utf8'))
if not m:
@ -39,13 +40,13 @@ def request(query, params):
if not from_lang or not to_lang:
return params
params['url'] = url.format(from_lang=from_lang[1], to_lang=to_lang[1],query=query)
params['from_lang'] = from_lang[1]
params['to_lang'] = to_lang[1]
params['query'] = query
params['url'] = url.format(from_lang=from_lang[1],
to_lang=to_lang[1],
query=query)
return params
def response(resp):
results = []
@ -70,5 +71,3 @@ def response(resp):
})
return results