mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 18:27:09 +00:00
Flake8 and Pylint fixes
This commit is contained in:
parent
0ac34aaa52
commit
60b427accc
@ -50,7 +50,8 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||||||
continue
|
continue
|
||||||
dev.append(UberSensor('time', timeandpriceest, product_id, product))
|
dev.append(UberSensor('time', timeandpriceest, product_id, product))
|
||||||
if product.get('price_details') is not None:
|
if product.get('price_details') is not None:
|
||||||
dev.append(UberSensor('price', timeandpriceest, product_id, product))
|
dev.append(UberSensor('price', timeandpriceest,
|
||||||
|
product_id, product))
|
||||||
add_devices(dev)
|
add_devices(dev)
|
||||||
|
|
||||||
|
|
||||||
@ -128,7 +129,7 @@ class UberSensor(Entity):
|
|||||||
params['Cost per minute'] = price_details['cost_per_minute'],
|
params['Cost per minute'] = price_details['cost_per_minute'],
|
||||||
params['Distance units'] = price_details['distance_unit'],
|
params['Distance units'] = price_details['distance_unit'],
|
||||||
params['Cancellation fee'] = price_details['cancellation_fee'],
|
params['Cancellation fee'] = price_details['cancellation_fee'],
|
||||||
params['Cost per distance unit'] = price_details['cost_per_distance'],
|
params['Cost per distance'] = price_details['cost_per_distance'],
|
||||||
params['Base price'] = price_details['base'],
|
params['Base price'] = price_details['base'],
|
||||||
params['Price estimate'] = price_details.get('estimate', 'N/A'),
|
params['Price estimate'] = price_details.get('estimate', 'N/A'),
|
||||||
params['Price currency code'] = price_details.get('currency_code'),
|
params['Price currency code'] = price_details.get('currency_code'),
|
||||||
@ -216,8 +217,8 @@ class UberEstimate(object):
|
|||||||
'0')
|
'0')
|
||||||
price_details["low_estimate"] = price.get('low_estimate',
|
price_details["low_estimate"] = price.get('low_estimate',
|
||||||
'0')
|
'0')
|
||||||
price_details["surge_multiplier"] = price.get('surge_multiplier',
|
surge_multiplier = price.get('surge_multiplier', '0')
|
||||||
'0')
|
price_details["surge_multiplier"] = surge_multiplier
|
||||||
|
|
||||||
estimate_response = client.get_pickup_time_estimates(
|
estimate_response = client.get_pickup_time_estimates(
|
||||||
self.start_latitude, self.start_longitude)
|
self.start_latitude, self.start_longitude)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user