aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2023-09-04 21:31:07 +0100
committerGravatar Joe Banks <[email protected]>2023-09-04 21:31:07 +0100
commitb3b64d39fee42db023f1eb3a5a2e4127e46ed6bf (patch)
tree7eaf860e4158bb25f85542edb42f47bffd8aa40c
parentMerge pull request #74 from python-discord/jb3/sqlalchemy-2 (diff)
Add to sys.path in Alembic env
-rw-r--r--alembic/env.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/alembic/env.py b/alembic/env.py
index 91aca63..61b0843 100644
--- a/alembic/env.py
+++ b/alembic/env.py
@@ -1,12 +1,16 @@
import asyncio
+import sys
from logging.config import fileConfig
from sqlalchemy import Connection, pool
from sqlalchemy.ext.asyncio import async_engine_from_config
from alembic import context
-from metricity.database import build_db_uri
-from metricity.models import Base
+
+sys.path.append(".")
+
+from metricity.database import build_db_uri # noqa: E402, I001
+from metricity.models import Base # noqa: E402
# this is the Alembic Config object, which provides
# access to the values within the .ini file in use.