Clean mypy run
This commit is contained in:
parent
cd2f13caf2
commit
46be7cabb8
15
.vscode/tasks.json
vendored
Normal file
15
.vscode/tasks.json
vendored
Normal 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
0
app/__init__.py
Normal 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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user