[biplan + hybride] better specific classes declaration

This commit is contained in:
Bezleputh 2013-11-29 12:38:59 +01:00 committed by Florent
commit f6f723674f
2 changed files with 21 additions and 14 deletions

View file

@ -22,11 +22,13 @@ from weboob.capabilities.calendar import BaseCalendarEvent, TRANSP, STATUS, CATE
class BiplanCalendarEvent(BaseCalendarEvent): class BiplanCalendarEvent(BaseCalendarEvent):
city = 'LILLE' def __init__(self, _id):
location = '19, rue Colbert' BaseCalendarEvent.__init__(self, _id)
sequence = 1 self.city = u'LILLE'
transp = TRANSP.TRANSPARENT self.location = u'19, rue Colbert'
status = STATUS.CONFIRMED self.sequence = 1
self.transp = TRANSP.TRANSPARENT
self.status = STATUS.CONFIRMED
@classmethod @classmethod
def id2url(cls, _id): def id2url(cls, _id):
@ -34,8 +36,12 @@ class BiplanCalendarEvent(BaseCalendarEvent):
class BiplanCalendarEventConcert(BiplanCalendarEvent): class BiplanCalendarEventConcert(BiplanCalendarEvent):
category = CATEGORIES.CONCERT def __init__(self, _id):
BiplanCalendarEvent.__init__(self, _id)
self.category = CATEGORIES.CONCERT
class BiplanCalendarEventTheatre(BiplanCalendarEvent): class BiplanCalendarEventTheatre(BiplanCalendarEvent):
category = CATEGORIES.THEATRE def __init__(self, _id):
BiplanCalendarEvent.__init__(self, _id)
self.category = CATEGORIES.THEATRE

View file

@ -21,13 +21,14 @@ from weboob.capabilities.calendar import BaseCalendarEvent, TRANSP, STATUS, CATE
class HybrideCalendarEvent(BaseCalendarEvent): class HybrideCalendarEvent(BaseCalendarEvent):
def __init__(self, _id):
location = '18 rue Gosselet' BaseCalendarEvent.__init__(self, _id)
city = 'Lille' self.location = u'18 rue Gosselet'
sequence = 1 self.city = u'Lille'
transp = TRANSP.TRANSPARENT self.sequence = 1
status = STATUS.CONFIRMED self.transp = TRANSP.TRANSPARENT
category = CATEGORIES.CINE self.status = STATUS.CONFIRMED
self.category = CATEGORIES.CINE
@classmethod @classmethod
def id2url(cls, _id): def id2url(cls, _id):