chore: add ruff and ty, fix linting

- Add ruff (line-length 88) and ty to dev dependencies
- Fix all ruff linting errors
- Configure ty to ignore nullable type warnings
- Update AGENTS.md with linting instructions
This commit is contained in:
2026-02-02 21:43:08 +03:00
parent 52dce1b2b8
commit fc3f438cbf
8 changed files with 141 additions and 38 deletions

View File

@@ -9,7 +9,6 @@ from src.database import (
get_connection,
get_replicas_for_track,
get_scenario,
get_track_speaker_ids,
)
from src.logger import logger
@@ -132,7 +131,7 @@ def find_available_track(user_id: int) -> tuple[str, int] | None:
if key in track_recordings and user_id in track_recordings[key]:
# Пользователь уже записывает эту дорожку — пропускаем
continue
# Пользователь записывает другую дорожку в этом сценарии — пропускаем весь сценарий
# Пользователь записывает другую дорожку в этом сценарии
continue
if key not in track_recordings: