refactor(docs+comments): add Google-style docstrings and inline comments across backend

Task D — Google-style docstrings (Args/Returns) on every public function,
method, and class across all 158 Python files in the backend. Zero ruff D
violations (pydocstyle Google convention).

Task E — Explanatory one-line comment before every code line (~11600 new
comments). ruff check passes clean after isort re-sort.
This commit is contained in:
kitos
2026-06-10 12:37:15 +02:00
parent 394d5d9056
commit c99cc4946a
158 changed files with 14861 additions and 248 deletions
+17
View File
@@ -1,28 +1,45 @@
"""Pydantic schemas for Notification endpoints."""
# Import uuid
import uuid
# Import datetime from datetime
from datetime import datetime
# Import BaseModel, ConfigDict from pydantic
from pydantic import BaseModel, ConfigDict
# Define class NotificationOut
class NotificationOut(BaseModel):
"""Notification returned by the API."""
# id: uuid.UUID
id: uuid.UUID
# user_id: uuid.UUID
user_id: uuid.UUID
# type: str
type: str
# title: str
title: str
# Assign message = None
message: str | None = None
# Assign entity_type = None
entity_type: str | None = None
# Assign entity_id = None
entity_id: uuid.UUID | None = None
# Assign read = False
read: bool = False
# Assign created_at = None
created_at: datetime | None = None
# Assign model_config = ConfigDict(from_attributes=True)
model_config = ConfigDict(from_attributes=True)
# Define class UnreadCountOut
class UnreadCountOut(BaseModel):
"""Simple counter response."""
# unread_count: int
unread_count: int