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

@ -47,6 +47,7 @@ class JsonFormatter(IFormatter):
"""
Formats the whole list as a single JSON list object.
"""
def __init__(self):
IFormatter.__init__(self)
self.queue = []
@ -66,9 +67,11 @@ class JsonLineFormatter(IFormatter):
Formats the list as received, with a JSON object per line.
The advantage is that it can be streamed.
"""
def format_dict(self, item):
self.output(json.dumps(item, cls=Encoder))
def test():
from .iformatter import formatter_test_output as fmt
assert fmt(JsonFormatter, {'foo': 'bar'}) == '[{"foo": "bar"}]\n'