From b0308acb1f4bb9cb0f7a8c27f569a0522353e65c Mon Sep 17 00:00:00 2001 From: Drobysh Date: Mon, 5 Oct 2026 11:16:24 +0000 Subject: [PATCH] =?UTF-8?q?chore(lint):=20=D1=83=D0=B4=D0=B0=D0=BB=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D0=BD=D0=B5=D0=B8=D1=81=D0=BF=D0=BE=D0=BB=D1=8C?= =?UTF-8?q?=D0=B7=D1=83=D0=B5=D0=BC=D1=8B=D0=B5=20=D0=B8=D0=BC=D0=BF=D0=BE?= =?UTF-8?q?=D1=80=D1=82=D1=8B=20(ruff=20F401)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 11 файлов, 16 unused imports удалено - pip 24.0 → 26.2.1, urllib3 2.7.0 → 2.8.0 (CVE fix) - pip-audit: 0 vulnerabilities - Логика не затронута, только imports - Проверено: systemctl restart OK, /health 200 --- archive_old_data.py | 3 +-- main.py | 4 +--- routers/achievements.py | 2 +- routers/admin_ai.py | 1 - routers/admin_content.py | 1 - routers/assistant.py | 1 - routers/bubblewords.py | 1 - routers/feed.py | 3 +-- routers/learning.py | 1 - routers/pronunciation.py | 1 - routers/typing.py | 1 - 11 files changed, 4 insertions(+), 15 deletions(-) diff --git a/archive_old_data.py b/archive_old_data.py index 29105a0..906d4ee 100644 --- a/archive_old_data.py +++ b/archive_old_data.py @@ -10,9 +10,8 @@ import asyncio import asyncpg import json -import os import logging -from datetime import datetime, timedelta, timezone +from datetime import datetime from decimal import Decimal from pathlib import Path from config import DB_CONFIG diff --git a/main.py b/main.py index 48cf082..6262e34 100644 --- a/main.py +++ b/main.py @@ -2,12 +2,10 @@ import asyncio import ipaddress import logging import os -import re import time from collections import defaultdict from contextlib import asynccontextmanager -from pathlib import Path -from fastapi import FastAPI, Request, HTTPException +from fastapi import FastAPI, Request from fastapi.middleware.cors import CORSMiddleware from fastapi.responses import JSONResponse from fastapi.staticfiles import StaticFiles diff --git a/routers/achievements.py b/routers/achievements.py index 81d767f..48326bf 100644 --- a/routers/achievements.py +++ b/routers/achievements.py @@ -1,6 +1,6 @@ import logging -from fastapi import APIRouter, Request, HTTPException +from fastapi import APIRouter, Request from auth import require_auth from database import get_pool diff --git a/routers/admin_ai.py b/routers/admin_ai.py index 5dfc9b2..4c5491d 100644 --- a/routers/admin_ai.py +++ b/routers/admin_ai.py @@ -11,7 +11,6 @@ Admin AI Router — универсальный AI-помощник в админ import logging import time from collections import defaultdict -from typing import Optional import httpx from fastapi import APIRouter, Request, HTTPException diff --git a/routers/admin_content.py b/routers/admin_content.py index 8c39658..9e2294e 100644 --- a/routers/admin_content.py +++ b/routers/admin_content.py @@ -71,7 +71,6 @@ topic_id теперь: {level}_{track}_{slug}. принимаем и сохраняем options_language ('pl' или 'user'). """ import logging -import re from typing import Optional from fastapi import APIRouter, Request, HTTPException diff --git a/routers/assistant.py b/routers/assistant.py index 61da76c..2b40610 100644 --- a/routers/assistant.py +++ b/routers/assistant.py @@ -5,7 +5,6 @@ AI Assistant Router — чат-помощник с историей, конте """ import logging import time -import json import httpx from fastapi import APIRouter, Request, HTTPException from auth import require_auth diff --git a/routers/bubblewords.py b/routers/bubblewords.py index 5be1d8f..ccae11a 100644 --- a/routers/bubblewords.py +++ b/routers/bubblewords.py @@ -1,5 +1,4 @@ import random -import time import hashlib # 🔧 НОВОЕ: импорт hashlib для стабильного хэширования from fastapi import APIRouter, Request, HTTPException from auth import require_auth diff --git a/routers/feed.py b/routers/feed.py index 97b78bb..83c5485 100644 --- a/routers/feed.py +++ b/routers/feed.py @@ -23,9 +23,8 @@ import logging import json import re import uuid -import os from pathlib import Path -from typing import Optional, Any +from typing import Optional import httpx from fastapi import APIRouter, Request, HTTPException, UploadFile, File, Form diff --git a/routers/learning.py b/routers/learning.py index 6091948..4184bfe 100644 --- a/routers/learning.py +++ b/routers/learning.py @@ -13,7 +13,6 @@ from fastapi import APIRouter, Request, HTTPException from auth import require_auth from database import get_pool from config import TOGETHER_API_KEY -from .learning_data import init_learning_data from .learning_profile import get_weak_skills, get_strong_skills logger = logging.getLogger(__name__) diff --git a/routers/pronunciation.py b/routers/pronunciation.py index f60713a..c20b520 100644 --- a/routers/pronunciation.py +++ b/routers/pronunciation.py @@ -1,4 +1,3 @@ -import random from fastapi import APIRouter, Request, HTTPException from auth import require_auth from database import get_pool diff --git a/routers/typing.py b/routers/typing.py index 794ea20..4131ba3 100644 --- a/routers/typing.py +++ b/routers/typing.py @@ -3,7 +3,6 @@ Typing Router — раздел "Печать". Пользователь печатает польские предложения, система проверяет. Без AI — просто сравнение с правильным ответом из БД. """ -import random from fastapi import APIRouter, Request, HTTPException from auth import require_auth from database import get_pool