pep8 blank lines fixes

flake8 --select W391,E302,E301,E304

autopep8 can't fix W391 even though it claims it can.
Fixed using a simple custom script.
This commit is contained in:
Laurent Bachelier 2014-10-10 23:04:08 +02:00
commit 448c06d125
142 changed files with 249 additions and 25 deletions

View file

@ -38,6 +38,7 @@ __all__ = ['FrenchTransaction', 'AmericanTransaction']
class classproperty(object):
def __init__(self, f):
self.f = f
def __get__(self, obj, owner):
return self.f(owner)
@ -225,6 +226,7 @@ class FrenchTransaction(Transaction):
@classmethod
def Raw(klass, *args, **kwargs):
patterns = klass.PATTERNS
class Filter(CleanText):
def __call__(self, item):
raw = super(Filter, self).__call__(item)
@ -286,6 +288,7 @@ class FrenchTransaction(Transaction):
break
return raw
def filter(self, text):
text = super(Filter, self).filter(text)
return to_unicode(text.replace(u'\n', u' ').strip())
@ -332,6 +335,7 @@ class AmericanTransaction(Transaction):
text = text.replace(',', ' ').replace('.', ',')
return FrenchTransaction.clean_amount(text)
def test():
clean_amount = AmericanTransaction.clean_amount
assert clean_amount('42') == '42'

View file

@ -70,6 +70,7 @@ def image_mime(data_base64, supported_formats=('gif', 'jpeg', 'png')):
'MM\x2a\x00' in beginning):
return 'image/tiff'
def test():
class MockPasteModule(BasePasteModule):
def __init__(self, expirations):

View file

@ -39,4 +39,3 @@ class StreamInfo(BaseObject):
return u'%s - %s' % (self.who, self.what)
else:
return self.what