diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c375148..2f7db27 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.11", "3.12"] + python-version: ["3.11"] steps: - uses: actions/checkout@v4 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f51eccb..5e8574c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -36,5 +36,5 @@ repos: - pydantic-settings>=2.0.0 - sqlalchemy>=2.0.0 - fastapi>=0.100.0 + - alembic>=1.7.0 - types-paho-mqtt>=1.6.0 - args: ["--ignore-missing-imports"] diff --git a/pyproject.toml b/pyproject.toml index eacb525..22eed6f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -107,6 +107,7 @@ module = [ "paho.*", "uvicorn.*", "alembic.*", + "meshcore.*", ] ignore_missing_imports = true diff --git a/src/meshcore_hub/__main__.py b/src/meshcore_hub/__main__.py index 86db823..7e1de6a 100644 --- a/src/meshcore_hub/__main__.py +++ b/src/meshcore_hub/__main__.py @@ -71,7 +71,7 @@ def db() -> None: def db_upgrade(revision: str, database_url: str | None) -> None: """Upgrade database to a later version.""" import os - from alembic import command # type: ignore[attr-defined] + from alembic import command from alembic.config import Config click.echo(f"Upgrading database to revision: {revision}") @@ -101,7 +101,7 @@ def db_upgrade(revision: str, database_url: str | None) -> None: def db_downgrade(revision: str, database_url: str | None) -> None: """Revert database to a previous version.""" import os - from alembic import command # type: ignore[attr-defined] + from alembic import command from alembic.config import Config click.echo(f"Downgrading database to revision: {revision}") @@ -130,7 +130,7 @@ def db_downgrade(revision: str, database_url: str | None) -> None: ) def db_revision(message: str, autogenerate: bool) -> None: """Create a new database migration.""" - from alembic import command # type: ignore[attr-defined] + from alembic import command from alembic.config import Config click.echo(f"Creating new revision: {message}") @@ -151,7 +151,7 @@ def db_revision(message: str, autogenerate: bool) -> None: def db_current(database_url: str | None) -> None: """Show current database revision.""" import os - from alembic import command # type: ignore[attr-defined] + from alembic import command from alembic.config import Config alembic_cfg = Config("alembic.ini") @@ -164,7 +164,7 @@ def db_current(database_url: str | None) -> None: @db.command("history") def db_history() -> None: """Show database migration history.""" - from alembic import command # type: ignore[attr-defined] + from alembic import command from alembic.config import Config alembic_cfg = Config("alembic.ini")