From bbe4fd7f39493952541b8bf6da022b37b0094b55 Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Fri, 19 May 2017 09:08:15 +0200 Subject: [PATCH] Improve mako template for additionnal imports. --- accountant/migrations/script.py.mako | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/accountant/migrations/script.py.mako b/accountant/migrations/script.py.mako index 6191a83..712d479 100644 --- a/accountant/migrations/script.py.mako +++ b/accountant/migrations/script.py.mako @@ -19,7 +19,12 @@ depends_on = ${repr(depends_on)} # pylint: disable=wrong-import-position from alembic import op # 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 def upgrade():