diff --git a/pyproject.toml b/pyproject.toml index 1807eee..0fce72f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -544,6 +544,7 @@ banned-from = [ [tool.ruff.lint.flake8-import-conventions.extend-aliases] +"alembic.command" = "alembic_cmd" "click.core" = "cli_core" "click.testing" = "cli_testing" "collections.abc" = "cabc" diff --git a/tests/conftest.py b/tests/conftest.py index ebd7fc8..5b1ac35 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -8,7 +8,7 @@ import os import pytest import sqlalchemy as sa -from alembic import command as migrations_cmd +from alembic import command as alembic_cmd from alembic import config as migrations_config from sqlalchemy import orm @@ -60,7 +60,7 @@ def db_connection(request): db.Base.metadata.create_all(connection) else: cfg = migrations_config.Config("alembic.ini") - migrations_cmd.upgrade(cfg, "head") + alembic_cmd.upgrade(cfg, "head") try: yield connection