lint: Clean up W503 PEP-8 warning.
This commit is contained in:
parent
4b015ecdff
commit
07cdd69e42
5 changed files with 27 additions and 27 deletions
|
@ -171,16 +171,16 @@ class CommuteHandler(object):
|
|||
|
||||
# determines if fare information is available
|
||||
try:
|
||||
fare = ('Fare: ' + variable_list["fare"]["currency"]
|
||||
+ variable_list["fare"]["text"])
|
||||
fare = ('Fare: ' + variable_list["fare"]["currency"] +
|
||||
variable_list["fare"]["text"])
|
||||
output += '\n' + fare
|
||||
except (KeyError, IndexError):
|
||||
pass
|
||||
|
||||
# determines if traffic duration information is available
|
||||
try:
|
||||
traffic_duration = ('Duration in traffic: '
|
||||
+ variable_list["duration_in_traffic"]
|
||||
traffic_duration = ('Duration in traffic: ' +
|
||||
variable_list["duration_in_traffic"]
|
||||
["text"])
|
||||
output += '\n' + traffic_duration
|
||||
except (KeyError, IndexError):
|
||||
|
@ -208,13 +208,13 @@ class CommuteHandler(object):
|
|||
return request.json()
|
||||
else:
|
||||
self.send_info(message,
|
||||
"Something went wrong. Please try again."
|
||||
+ " Error: {error_num}.\n{error_text}"
|
||||
"Something went wrong. Please try again." +
|
||||
" Error: {error_num}.\n{error_text}"
|
||||
.format(error_num=request.status_code,
|
||||
error_text=request.text), client)
|
||||
return
|
||||
r = requests.get('https://maps.googleapis.com/maps/api/'
|
||||
+ 'distancematrix/json', params=params)
|
||||
r = requests.get('https://maps.googleapis.com/maps/api/' +
|
||||
'distancematrix/json', params=params)
|
||||
result = validate_requests(r)
|
||||
return result
|
||||
|
||||
|
|
|
@ -120,9 +120,9 @@ Example Inputs:
|
|||
return
|
||||
|
||||
if received_json['meta']['code'] == 200:
|
||||
response_msg = ('Food nearby ' + params['near']
|
||||
+ ' coming right up:\n'
|
||||
+ self.format_json(received_json['response']['venues']))
|
||||
response_msg = ('Food nearby ' + params['near'] +
|
||||
' coming right up:\n' +
|
||||
self.format_json(received_json['response']['venues']))
|
||||
self.send_info(message, response_msg, client)
|
||||
return
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue