From de5e49b497cc8f5904637fa5d913e2f8b331f2e8 Mon Sep 17 00:00:00 2001 From: Alexander Hess Date: Mon, 30 Nov 2026 20:13:46 +0100 Subject: [PATCH] Import `alembic.config` as `alembic_config` --- pyproject.toml | 1 + tests/conftest.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0fce72f..db2cf8b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -545,6 +545,7 @@ banned-from = [ [tool.ruff.lint.flake8-import-conventions.extend-aliases] "alembic.command" = "alembic_cmd" +"alembic.config" = "alembic_config" "click.core" = "cli_core" "click.testing" = "cli_testing" "collections.abc" = "cabc" diff --git a/tests/conftest.py b/tests/conftest.py index 5b1ac35..2a89767 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -9,7 +9,7 @@ import os import pytest import sqlalchemy as sa from alembic import command as alembic_cmd -from alembic import config as migrations_config +from alembic import config as alembic_config from sqlalchemy import orm from velofy import config @@ -59,7 +59,7 @@ def db_connection(request): connection.execute(sa.text(f"CREATE SCHEMA {config.CLEAN_SCHEMA};")) db.Base.metadata.create_all(connection) else: - cfg = migrations_config.Config("alembic.ini") + cfg = alembic_config.Config("alembic.ini") alembic_cmd.upgrade(cfg, "head") try: