# HG changeset patch # User Mads Kiilerich # Date 2020-02-01 13:39:46 # Node ID a5e719bc7b40cf5f53fb00954b6a045c8f27cbc3 # Parent a8c8b32aee5a8d72ca6bcb36200eed4595eba94f config: fix pyflakes warning about unused tg import app_cfg had an unused 'import tg'. tg.hooks was used, but through a separate import. Clean that up by consistently using tg (which always makes tg.hooks available) and dropping the separate hooks import. diff --git a/kallithea/config/app_cfg.py b/kallithea/config/app_cfg.py --- a/kallithea/config/app_cfg.py +++ b/kallithea/config/app_cfg.py @@ -28,7 +28,6 @@ import tg from alembic.migration import MigrationContext from alembic.script.base import ScriptDirectory from sqlalchemy import create_engine -from tg import hooks from tg.configuration import AppConfig from tg.support.converters import asbool @@ -187,7 +186,7 @@ def setup_configuration(app): kallithea.model.meta.Session.remove() -hooks.register('configure_new_app', setup_configuration) +tg.hooks.register('configure_new_app', setup_configuration) def setup_application(app): @@ -211,4 +210,4 @@ def setup_application(app): return app -hooks.register('before_config', setup_application) +tg.hooks.register('before_config', setup_application)