pep8 cleaning
This commit is contained in:
parent
01c4c7b3ca
commit
a74f832d52
3 changed files with 17 additions and 18 deletions
|
|
@ -37,8 +37,7 @@ class VelibBackend(BaseBackend, ICapGauge):
|
||||||
LICENSE = 'AGPLv3'
|
LICENSE = 'AGPLv3'
|
||||||
|
|
||||||
BROWSER = VelibBrowser
|
BROWSER = VelibBrowser
|
||||||
STORAGE = {'boards' : {}}
|
STORAGE = {'boards': {}}
|
||||||
|
|
||||||
|
|
||||||
def iter_gauges(self, pattern=None):
|
def iter_gauges(self, pattern=None):
|
||||||
if pattern is None:
|
if pattern is None:
|
||||||
|
|
@ -80,7 +79,7 @@ class VelibBackend(BaseBackend, ICapGauge):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def _get_sensor_by_id(self, id):
|
def _get_sensor_by_id(self, id):
|
||||||
reSensorId = re.search ('(\d+)-((bikes|attach|status))', id, re.IGNORECASE)
|
reSensorId = re.search('(\d+)-((bikes|attach|status))', id, re.IGNORECASE)
|
||||||
if reSensorId:
|
if reSensorId:
|
||||||
gauge = reSensorId.group(1)
|
gauge = reSensorId.group(1)
|
||||||
pattern = reSensorId.group(2)
|
pattern = reSensorId.group(2)
|
||||||
|
|
|
||||||
|
|
@ -44,4 +44,3 @@ class VelibBrowser(BaseBrowser):
|
||||||
def get_station_infos(self, gauge):
|
def get_station_infos(self, gauge):
|
||||||
self.location('%s://%s/stationdetails/paris/%s' % (self.PROTOCOL, self.DOMAIN, gauge.id))
|
self.location('%s://%s/stationdetails/paris/%s' % (self.PROTOCOL, self.DOMAIN, gauge.id))
|
||||||
return self.page.get_station_infos(gauge.id)
|
return self.page.get_station_infos(gauge.id)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ __all__ = ['InfoStationPage', 'ListStationsPage']
|
||||||
|
|
||||||
AdresseStation = {}
|
AdresseStation = {}
|
||||||
|
|
||||||
|
|
||||||
class InfoStationPage(BasePage):
|
class InfoStationPage(BasePage):
|
||||||
def _create_bikes_sensor(self, value, gauge_id, last_update, adresse):
|
def _create_bikes_sensor(self, value, gauge_id, last_update, adresse):
|
||||||
levelbikes = GaugeSensor(gauge_id + '-bikes')
|
levelbikes = GaugeSensor(gauge_id + '-bikes')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue