Clean mypy run

This commit is contained in:
Timothy Farrell 2025-12-28 12:09:53 -06:00
parent cd2f13caf2
commit 46be7cabb8
3 changed files with 17 additions and 2 deletions

15
.vscode/tasks.json vendored Normal file
View File

@ -0,0 +1,15 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Run Mypy",
"type": "shell",
"command": "uv run mypy .",
"problemMatcher": [
"$python"
]
}
]
}

0
app/__init__.py Normal file
View File

View File

@ -1,5 +1,5 @@
"""Database configuration and connection management."""
from typing import AsyncGenerator
from typing import Generator
from sqlalchemy import create_engine, MetaData
from sqlalchemy.ext.asyncio import AsyncSession, create_async_engine, async_sessionmaker
from sqlalchemy.orm import DeclarativeBase, sessionmaker, Session
@ -25,7 +25,7 @@ engine = create_engine(
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
def get_db() -> AsyncGenerator[Session, None]:
def get_db() -> Generator[Session, None]:
"""Dependency to get database session."""
db = SessionLocal()
try: