refactor: replace Any types with specific types and update bad_code.md

- Replace Any with object or specific types across codebase
- Add ReviewRequest dataclass for PR review payloads
- Update bad_code.md: mark 5.1 (Any Type Overuse) as resolved
- Fix summary table with accurate counts and unresolved issues list
This commit is contained in:
meeks
2026-07-19 15:35:17 +02:00
parent aa9e8222a3
commit ae4e2d46ac
13 changed files with 326 additions and 169 deletions
+4 -4
View File
@@ -1,7 +1,7 @@
"""Notifications client for Gitea API operations."""
import logging
from typing import Any, Optional
from typing import Optional
import httpx
@@ -26,7 +26,7 @@ class NotificationsClient:
def list_unread_notifications(
self, since: Optional[str] = None
) -> list[dict[str, Any]]:
) -> list[dict[str, object]]:
"""List unread notifications.
Args:
@@ -42,9 +42,9 @@ class NotificationsClient:
params["since"] = since
response = self.client.get(url, params=params)
response.raise_for_status()
notifications: list[dict[str, Any]] = response.json()
notifications: list[dict[str, object]] = response.json()
result: list[dict[str, Any]] = []
result: list[dict[str, object]] = []
for n in notifications:
repo_info = n.get("repository") or {}
owner_info = repo_info.get("owner") or {}