This commit is contained in:
Louis King
2025-12-03 15:47:42 +00:00
parent 844166c7a8
commit 601dd51cd0
4 changed files with 8 additions and 7 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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"]
+1
View File
@@ -107,6 +107,7 @@ module = [
"paho.*",
"uvicorn.*",
"alembic.*",
"meshcore.*",
]
ignore_missing_imports = true
+5 -5
View File
@@ -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")