chore(lint): удалить неиспользуемые импорты (ruff F401)
- 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
This commit is contained in:
+1
-2
@@ -10,9 +10,8 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
import asyncpg
|
import asyncpg
|
||||||
import json
|
import json
|
||||||
import os
|
|
||||||
import logging
|
import logging
|
||||||
from datetime import datetime, timedelta, timezone
|
from datetime import datetime
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from config import DB_CONFIG
|
from config import DB_CONFIG
|
||||||
|
|||||||
@@ -2,12 +2,10 @@ import asyncio
|
|||||||
import ipaddress
|
import ipaddress
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import re
|
|
||||||
import time
|
import time
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from contextlib import asynccontextmanager
|
from contextlib import asynccontextmanager
|
||||||
from pathlib import Path
|
from fastapi import FastAPI, Request
|
||||||
from fastapi import FastAPI, Request, HTTPException
|
|
||||||
from fastapi.middleware.cors import CORSMiddleware
|
from fastapi.middleware.cors import CORSMiddleware
|
||||||
from fastapi.responses import JSONResponse
|
from fastapi.responses import JSONResponse
|
||||||
from fastapi.staticfiles import StaticFiles
|
from fastapi.staticfiles import StaticFiles
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
from fastapi import APIRouter, Request, HTTPException
|
from fastapi import APIRouter, Request
|
||||||
from auth import require_auth
|
from auth import require_auth
|
||||||
from database import get_pool
|
from database import get_pool
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ Admin AI Router — универсальный AI-помощник в админ
|
|||||||
import logging
|
import logging
|
||||||
import time
|
import time
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from typing import Optional
|
|
||||||
|
|
||||||
import httpx
|
import httpx
|
||||||
from fastapi import APIRouter, Request, HTTPException
|
from fastapi import APIRouter, Request, HTTPException
|
||||||
|
|||||||
@@ -71,7 +71,6 @@ topic_id теперь: {level}_{track}_{slug}.
|
|||||||
принимаем и сохраняем options_language ('pl' или 'user').
|
принимаем и сохраняем options_language ('pl' или 'user').
|
||||||
"""
|
"""
|
||||||
import logging
|
import logging
|
||||||
import re
|
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from fastapi import APIRouter, Request, HTTPException
|
from fastapi import APIRouter, Request, HTTPException
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ AI Assistant Router — чат-помощник с историей, конте
|
|||||||
"""
|
"""
|
||||||
import logging
|
import logging
|
||||||
import time
|
import time
|
||||||
import json
|
|
||||||
import httpx
|
import httpx
|
||||||
from fastapi import APIRouter, Request, HTTPException
|
from fastapi import APIRouter, Request, HTTPException
|
||||||
from auth import require_auth
|
from auth import require_auth
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import random
|
import random
|
||||||
import time
|
|
||||||
import hashlib # 🔧 НОВОЕ: импорт hashlib для стабильного хэширования
|
import hashlib # 🔧 НОВОЕ: импорт hashlib для стабильного хэширования
|
||||||
from fastapi import APIRouter, Request, HTTPException
|
from fastapi import APIRouter, Request, HTTPException
|
||||||
from auth import require_auth
|
from auth import require_auth
|
||||||
|
|||||||
+1
-2
@@ -23,9 +23,8 @@ import logging
|
|||||||
import json
|
import json
|
||||||
import re
|
import re
|
||||||
import uuid
|
import uuid
|
||||||
import os
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Optional, Any
|
from typing import Optional
|
||||||
|
|
||||||
import httpx
|
import httpx
|
||||||
from fastapi import APIRouter, Request, HTTPException, UploadFile, File, Form
|
from fastapi import APIRouter, Request, HTTPException, UploadFile, File, Form
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ from fastapi import APIRouter, Request, HTTPException
|
|||||||
from auth import require_auth
|
from auth import require_auth
|
||||||
from database import get_pool
|
from database import get_pool
|
||||||
from config import TOGETHER_API_KEY
|
from config import TOGETHER_API_KEY
|
||||||
from .learning_data import init_learning_data
|
|
||||||
from .learning_profile import get_weak_skills, get_strong_skills
|
from .learning_profile import get_weak_skills, get_strong_skills
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import random
|
|
||||||
from fastapi import APIRouter, Request, HTTPException
|
from fastapi import APIRouter, Request, HTTPException
|
||||||
from auth import require_auth
|
from auth import require_auth
|
||||||
from database import get_pool
|
from database import get_pool
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ Typing Router — раздел "Печать".
|
|||||||
Пользователь печатает польские предложения, система проверяет.
|
Пользователь печатает польские предложения, система проверяет.
|
||||||
Без AI — просто сравнение с правильным ответом из БД.
|
Без AI — просто сравнение с правильным ответом из БД.
|
||||||
"""
|
"""
|
||||||
import random
|
|
||||||
from fastapi import APIRouter, Request, HTTPException
|
from fastapi import APIRouter, Request, HTTPException
|
||||||
from auth import require_auth
|
from auth import require_auth
|
||||||
from database import get_pool
|
from database import get_pool
|
||||||
|
|||||||
Reference in New Issue
Block a user