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:
parent
62f95b0b1b
commit
b19a482d47
@ -180,4 +180,5 @@ class PasteController(object):
|
|||||||
"""Show a captcha."""
|
"""Show a captcha."""
|
||||||
return Captcha().get_response(set_cookie=True)
|
return Captcha().get_response(set_cookie=True)
|
||||||
|
|
||||||
|
|
||||||
controller = PasteController
|
controller = PasteController
|
||||||
|
@ -24,6 +24,7 @@ def session_factory():
|
|||||||
options = {'autoflush': True, 'autocommit': False}
|
options = {'autoflush': True, 'autocommit': False}
|
||||||
return orm.create_session(application.engine, **options)
|
return orm.create_session(application.engine, **options)
|
||||||
|
|
||||||
|
|
||||||
session = orm.scoped_session(session_factory,
|
session = orm.scoped_session(session_factory,
|
||||||
scopefunc=_local_manager.get_ident)
|
scopefunc=_local_manager.get_ident)
|
||||||
|
|
||||||
@ -55,4 +56,5 @@ def _make_module():
|
|||||||
db.NoResultFound = orm.exc.NoResultFound
|
db.NoResultFound = orm.exc.NoResultFound
|
||||||
return db
|
return db
|
||||||
|
|
||||||
|
|
||||||
sys.modules['lodgeit.database.db'] = db = _make_module()
|
sys.modules['lodgeit.database.db'] = db = _make_module()
|
||||||
|
@ -38,6 +38,7 @@ def _get_pygments_lexers(add_empty=True):
|
|||||||
r.append((lexer[1][0], _(lexer[0])),)
|
r.append((lexer[1][0], _(lexer[0])),)
|
||||||
return r
|
return r
|
||||||
|
|
||||||
|
|
||||||
LANGUAGES = _get_pygments_lexers()
|
LANGUAGES = _get_pygments_lexers()
|
||||||
#: Add LodgeIt's special language lexers
|
#: Add LodgeIt's special language lexers
|
||||||
#: Or at least ensure those exist.
|
#: Or at least ensure those exist.
|
||||||
|
@ -43,6 +43,7 @@ def url_for(endpoint, external=False, **values):
|
|||||||
builder = local.ctx.url_adapter.build
|
builder = local.ctx.url_adapter.build
|
||||||
return builder(endpoint, values, force_external=external)
|
return builder(endpoint, values, force_external=external)
|
||||||
|
|
||||||
|
|
||||||
jinja_environment.globals['url_for'] = url_for
|
jinja_environment.globals['url_for'] = url_for
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,10 +15,12 @@ def run_app(app, path='/'):
|
|||||||
env = create_environ(path, SECRET_KEY)
|
env = create_environ(path, SECRET_KEY)
|
||||||
return run_wsgi_app(app, env)
|
return run_wsgi_app(app, env)
|
||||||
|
|
||||||
|
|
||||||
action_runserver = script.make_runserver(
|
action_runserver = script.make_runserver(
|
||||||
lambda: make_app(dburi, SECRET_KEY, debug=True),
|
lambda: make_app(dburi, SECRET_KEY, debug=True),
|
||||||
use_reloader=True)
|
use_reloader=True)
|
||||||
|
|
||||||
|
|
||||||
action_shell = script.make_shell(
|
action_shell = script.make_shell(
|
||||||
lambda: {
|
lambda: {
|
||||||
'app': make_app(dburi, SECRET_KEY, False, True),
|
'app': make_app(dburi, SECRET_KEY, False, True),
|
||||||
|
@ -21,4 +21,5 @@ def testcase():
|
|||||||
return with_setup(setup, teardown)(f)
|
return with_setup(setup, teardown)(f)
|
||||||
return dec
|
return dec
|
||||||
|
|
||||||
|
|
||||||
testcase.__test__ = False
|
testcase.__test__ = False
|
||||||
|
Loading…
Reference in New Issue
Block a user