Lint: E402 module level import not at top of file

This commit is contained in:
2020-11-06 20:39:18 -05:00
parent aecb845d6a
commit 98a573bbc7
3 changed files with 6 additions and 7 deletions

View File

@ -2,6 +2,7 @@ from __future__ import with_statement
from alembic import context
from sqlalchemy import engine_from_config, pool
from logging.config import fileConfig
from flask import current_app
import logging
# this is the Alembic Config object, which provides
@ -17,7 +18,6 @@ logger = logging.getLogger('alembic.env')
# for 'autogenerate' support
# from myapp import mymodel
# target_metadata = mymodel.Base.metadata
from flask import current_app
config.set_main_option('sqlalchemy.url',
current_app.config.get('SQLALCHEMY_DATABASE_URI'))
target_metadata = current_app.extensions['migrate'].db.metadata