fix(services): PEP 695 type params for get_or_create (ruff UP047)
CI / lint (push) Successful in 2s
CI / frontend-build (push) Successful in 22s
CI / backend-lint-and-test (push) Successful in 30s
CI / integration (push) Successful in 3m11s

CI lint flagged UP047 — use the native generic syntax def get_or_create[T](...)
instead of typing.TypeVar on Python 3.14.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-09 23:50:59 -04:00
parent 7b2a2051e9
commit f1a664e5a7
+1 -4
View File
@@ -15,16 +15,13 @@ sync/async boundary; the importer one stays as the lone sync consumer.
from __future__ import annotations from __future__ import annotations
from collections.abc import Awaitable, Callable from collections.abc import Awaitable, Callable
from typing import TypeVar
from sqlalchemy import Select from sqlalchemy import Select
from sqlalchemy.exc import IntegrityError from sqlalchemy.exc import IntegrityError
from sqlalchemy.ext.asyncio import AsyncSession from sqlalchemy.ext.asyncio import AsyncSession
T = TypeVar("T")
async def get_or_create[T](
async def get_or_create(
session: AsyncSession, session: AsyncSession,
select_stmt: Select, select_stmt: Select,
factory: Callable[[], Awaitable[T]], factory: Callable[[], Awaitable[T]],