Improve mako template for additionnal imports.

This commit is contained in:
Alexis Lahouze 2017-05-19 09:08:15 +02:00
parent f5415c3d66
commit bbe4fd7f39

View File

@ -19,7 +19,12 @@ depends_on = ${repr(depends_on)}
# pylint: disable=wrong-import-position # pylint: disable=wrong-import-position
from alembic import op # noqa from alembic import op # noqa
import sqlalchemy as sa # noqa import sqlalchemy as sa # noqa
${imports if imports else ""} % for imp in imports:
% if loop.index == 0:
% endif
${imp} # noqa
% endfor
# pylint: enable=wrong-import-position # pylint: enable=wrong-import-position
def upgrade(): def upgrade():