Fix PEP-8 errors

There are several instances of the error:

   E305 expected 2 blank lines after class or function definition

Fix them all by adding the necessary blank lines.

Change-Id: I37e2990772f05a100fe303c1512b7bdfb10a660d
This commit is contained in:
David Pursehouse 2017-02-25 13:47:11 +09:00
parent 62f95b0b1b
commit b19a482d47
6 changed files with 8 additions and 0 deletions

View File

@ -180,4 +180,5 @@ class PasteController(object):
"""Show a captcha."""
return Captcha().get_response(set_cookie=True)
controller = PasteController

View File

@ -24,6 +24,7 @@ def session_factory():
options = {'autoflush': True, 'autocommit': False}
return orm.create_session(application.engine, **options)
session = orm.scoped_session(session_factory,
scopefunc=_local_manager.get_ident)
@ -55,4 +56,5 @@ def _make_module():
db.NoResultFound = orm.exc.NoResultFound
return db
sys.modules['lodgeit.database.db'] = db = _make_module()

View File

@ -38,6 +38,7 @@ def _get_pygments_lexers(add_empty=True):
r.append((lexer[1][0], _(lexer[0])),)
return r
LANGUAGES = _get_pygments_lexers()
#: Add LodgeIt's special language lexers
#: Or at least ensure those exist.

View File

@ -43,6 +43,7 @@ def url_for(endpoint, external=False, **values):
builder = local.ctx.url_adapter.build
return builder(endpoint, values, force_external=external)
jinja_environment.globals['url_for'] = url_for

View File

@ -15,10 +15,12 @@ def run_app(app, path='/'):
env = create_environ(path, SECRET_KEY)
return run_wsgi_app(app, env)
action_runserver = script.make_runserver(
lambda: make_app(dburi, SECRET_KEY, debug=True),
use_reloader=True)
action_shell = script.make_shell(
lambda: {
'app': make_app(dburi, SECRET_KEY, False, True),

View File

@ -21,4 +21,5 @@ def testcase():
return with_setup(setup, teardown)(f)
return dec
testcase.__test__ = False