chore(lint): apply ruff --fix (4443 auto-fixes)
Auto-fixed categories: - F401: unused imports removed - I001: import blocks sorted - W293: trailing whitespace stripped - UP035: deprecated typing imports replaced - SIM: simplify suggestions applied - ARG: unused args prefixed with underscore - T201: print statements removed - F841: unused variables removed - RUF059: unpacked variables prefixed Remaining ~1500 unfixable errors (C901, B904, N806, E402) require manual work. Backend smoke tests: 13/13 passed.
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
# @RELATION DEPENDS_ON -> [LogEntry]
|
||||
# @RELATION COMPOSES -> [CotJsonFormatter]
|
||||
import logging
|
||||
from typing import Dict, Any, List, Optional
|
||||
from collections import deque
|
||||
from datetime import datetime
|
||||
from typing import Any
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
@@ -15,7 +15,7 @@ class LogEntry(BaseModel):
|
||||
timestamp: datetime = Field(default_factory=datetime.utcnow)
|
||||
level: str
|
||||
message: str
|
||||
context: Optional[Dict[str, Any]] = None
|
||||
context: dict[str, Any] | None = None
|
||||
# #endregion LogEntry
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ class WebSocketLogHandler(logging.Handler):
|
||||
|
||||
# #region WebSocketLogHandler.get_recent_logs [C:2] [TYPE Function] [SEMANTICS log,retrieve,buffer]
|
||||
# @BRIEF Returns a list of recent log entries from the buffer.
|
||||
def get_recent_logs(self) -> List[LogEntry]:
|
||||
def get_recent_logs(self) -> list[LogEntry]:
|
||||
"""
|
||||
Returns a list of recent log entries from the buffer.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user