diff --git a/backend/app/services/db_helpers.py b/backend/app/services/db_helpers.py index 2b934c4..992a76d 100644 --- a/backend/app/services/db_helpers.py +++ b/backend/app/services/db_helpers.py @@ -15,16 +15,13 @@ sync/async boundary; the importer one stays as the lone sync consumer. from __future__ import annotations from collections.abc import Awaitable, Callable -from typing import TypeVar from sqlalchemy import Select from sqlalchemy.exc import IntegrityError from sqlalchemy.ext.asyncio import AsyncSession -T = TypeVar("T") - -async def get_or_create( +async def get_or_create[T]( session: AsyncSession, select_stmt: Select, factory: Callable[[], Awaitable[T]],