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' 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)

View file

@ -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)

View file

@ -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')