fix docstring issues

This commit is contained in:
Romain Bignon 2014-08-30 20:45:10 +02:00
commit 7d8571195f
3 changed files with 12 additions and 11 deletions

View file

@ -170,6 +170,6 @@ class CapBill(CapCollection):
:param subscription: subscription to get balance :param subscription: subscription to get balance
:type subscription: :class:`Subscription` :type subscription: :class:`Subscription`
:rtype :class:`Detail` :rtype: class:`Detail`
""" """
raise NotImplementedError() raise NotImplementedError()

View file

@ -95,8 +95,8 @@ class CapJob(CapBase):
:param _id: id of the advert :param _id: id of the advert
:type _id: str :type _id: str
:param advert : the advert :param advert: the advert
:type advert : BaseJobAdvert :type advert: BaseJobAdvert
:rtype: :class:`BaseJobAdvert` or None is fot found. :rtype: :class:`BaseJobAdvert` or None if not found.
""" """
raise NotImplementedError() raise NotImplementedError()

View file

@ -32,7 +32,7 @@ from weboob.tools.browser2.elements import TableElement, ItemElement
from weboob.tools.browser2.filters import Filter, CleanText, CleanDecimal, TableCell from weboob.tools.browser2.filters import Filter, CleanText, CleanDecimal, TableCell
__all__ = ['FrenchTransaction'] __all__ = ['FrenchTransaction', 'AmericanTransaction']
class classproperty(object): class classproperty(object):
@ -103,11 +103,12 @@ class FrenchTransaction(Transaction):
PATTERN class attribute) with a list containing tuples of regexp PATTERN class attribute) with a list containing tuples of regexp
and the associated type, for example:: and the associated type, for example::
>>> PATTERNS = [(re.compile('^VIR(EMENT)? (?P<text>.*)'), FrenchTransaction.TYPE_TRANSFER), PATTERNS = [(re.compile(r'^VIR(EMENT)? (?P<text>.*)'), FrenchTransaction.TYPE_TRANSFER),
... (re.compile('^PRLV (?P<text>.*)'), FrenchTransaction.TYPE_ORDER), (re.compile(r'^PRLV (?P<text>.*)'), FrenchTransaction.TYPE_ORDER),
... (re.compile('^(?P<text>.*) CARTE \d+ PAIEMENT CB (?P<dd>\d{2})(?P<mm>\d{2}) ?(.*)$'), (re.compile(r'^(?P<text>.*) CARTE \d+ PAIEMENT CB (?P<dd>\d{2})(?P<mm>\d{2}) ?(.*)$'),
... FrenchTransaction.TYPE_CARD) FrenchTransaction.TYPE_CARD)
... ] ]
In regexps, you can define this patterns: In regexps, you can define this patterns:
@ -122,7 +123,7 @@ class FrenchTransaction(Transaction):
self.category = NotAvailable self.category = NotAvailable
if ' ' in self.raw: if ' ' in self.raw:
self.category, useless, self.label = [part.strip() for part in self.raw.partition(' ')] self.category, _, self.label = [part.strip() for part in self.raw.partition(' ')]
else: else:
self.label = self.raw self.label = self.raw