pep8 cleaning

This commit is contained in:
Florent 2013-10-28 18:35:26 +01:00
commit a74f832d52
3 changed files with 17 additions and 18 deletions

View file

@ -37,8 +37,7 @@ class VelibBackend(BaseBackend, ICapGauge):
LICENSE = 'AGPLv3'
BROWSER = VelibBrowser
STORAGE = {'boards' : {}}
STORAGE = {'boards': {}}
def iter_gauges(self, pattern=None):
if pattern is None:
@ -80,7 +79,7 @@ class VelibBackend(BaseBackend, ICapGauge):
return None
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:
gauge = reSensorId.group(1)
pattern = reSensorId.group(2)

View file

@ -44,4 +44,3 @@ class VelibBrowser(BaseBrowser):
def get_station_infos(self, gauge):
self.location('%s://%s/stationdetails/paris/%s' % (self.PROTOCOL, self.DOMAIN, gauge.id))
return self.page.get_station_infos(gauge.id)

View file

@ -28,6 +28,7 @@ __all__ = ['InfoStationPage', 'ListStationsPage']
AdresseStation = {}
class InfoStationPage(BasePage):
def _create_bikes_sensor(self, value, gauge_id, last_update, adresse):
levelbikes = GaugeSensor(gauge_id + '-bikes')