From 9fb8b150f2deded3f588b5c373194185cf7d3a7b Mon Sep 17 00:00:00 2001 From: juke Date: Tue, 8 Feb 2011 20:13:44 +0100 Subject: [PATCH] line too long --- weboob/capabilities/bank.py | 14 ++++++++------ weboob/capabilities/base.py | 13 +++++++++---- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/weboob/capabilities/bank.py b/weboob/capabilities/bank.py index ba1a0805..bf959719 100644 --- a/weboob/capabilities/bank.py +++ b/weboob/capabilities/bank.py @@ -21,7 +21,8 @@ from datetime import datetime, date from .base import IBaseCap, CapBaseObject -__all__ = ['Account', 'AccountNotFound', 'TransferError', 'ICapBank', 'Operation'] +__all__ = ['Account', 'AccountNotFound', 'TransferError', 'ICapBank', + 'Operation'] class AccountNotFound(Exception): @@ -48,20 +49,21 @@ class Account(CapBaseObject): class Operation(CapBaseObject): def __init__(self, id): CapBaseObject.__init__(self, id) - self.add_field('date', (basestring,datetime,date)) + self.add_field('date', (basestring, datetime, date)) self.add_field('label', unicode) self.add_field('amount', float) def __repr__(self): - return "" % (self.date, self.label, self.amount) + return "" % (self.date, + self.label, self.amount) class Transfer(CapBaseObject): def __init__(self, id): CapBaseObject.__init__(self, id) self.add_field('amount', float) - self.add_field('date', (basestring,datetime,date)) - self.add_field('origin', (int,long,basestring)) - self.add_field('recipient', (int,long,basestring)) + self.add_field('date', (basestring, datetime, date)) + self.add_field('origin', (int, long, basestring)) + self.add_field('recipient', (int, long, basestring)) class ICapBank(IBaseCap): def iter_accounts(self): diff --git a/weboob/capabilities/base.py b/weboob/capabilities/base.py index 9bf786e4..afdb479e 100644 --- a/weboob/capabilities/base.py +++ b/weboob/capabilities/base.py @@ -19,12 +19,14 @@ from weboob.tools.misc import iter_fields -__all__ = ['FieldNotFound', 'IBaseCap', 'NotAvailable', 'NotLoaded', 'CapBaseObject'] +__all__ = ['FieldNotFound', 'IBaseCap', 'NotAvailable', 'NotLoaded', + 'CapBaseObject'] class FieldNotFound(Exception): def __init__(self, obj, field): - Exception.__init__(self, u'Field "%s" not found for object %s' % (field, obj)) + Exception.__init__(self, + u'Field "%s" not found for object %s' % (field, obj)) class NotAvailableMeta(type): @@ -133,7 +135,8 @@ class CapBaseObject(object): if self._attribs is not None and name in self._attribs: return self._attribs[name].value else: - raise AttributeError, "'%s' object has no attribute '%s'" % (self.__class__.__name__, name) + raise AttributeError, "'%s' object has no attribute '%s'" % ( + self.__class__.__name__, name) def __setattr__(self, name, value): try: @@ -145,5 +148,7 @@ class CapBaseObject(object): value is not NotLoaded and \ value is not NotAvailable and \ value is not None: - raise ValueError('Value for "%s" needs to be of type %r, not %r' % (name, attr.type, type(value))) + raise ValueError( + 'Value for "%s" needs to be of type %r, not %r' % ( + name, attr.type, type(value))) attr.value = value