refactor: Improve code readability and structure across TTS modules
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
"""TTS repository for database operations."""
|
||||
|
||||
from collections.abc import Sequence
|
||||
from typing import Any
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
from sqlmodel import select
|
||||
|
||||
@@ -12,7 +15,13 @@ from app.repositories.base import BaseRepository
|
||||
class TTSRepository(BaseRepository[TTS]):
|
||||
"""Repository for TTS operations."""
|
||||
|
||||
def __init__(self, session: Any) -> None:
|
||||
def __init__(self, session: "AsyncSession") -> None:
|
||||
"""Initialize TTS repository.
|
||||
|
||||
Args:
|
||||
session: Database session for operations
|
||||
|
||||
"""
|
||||
super().__init__(TTS, session)
|
||||
|
||||
async def get_by_user_id(
|
||||
|
||||
Reference in New Issue
Block a user