forked from cardosofelipe/pragma-stack
fix(llm-gateway): improve type safety and datetime consistency
- Add type annotations for mypy compliance - Use UTC-aware datetimes consistently (datetime.now(UTC)) - Add type: ignore comments for LiteLLM incomplete stubs - Fix import ordering and formatting - Update pyproject.toml mypy configuration 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -233,7 +233,7 @@ class CostTracker:
|
||||
) -> UsageReport:
|
||||
"""Get usage report from a Redis hash."""
|
||||
r = await self._get_redis()
|
||||
data = await r.hgetall(key)
|
||||
data = await r.hgetall(key) # type: ignore[misc]
|
||||
|
||||
# Parse the hash data
|
||||
by_model: dict[str, dict[str, Any]] = {}
|
||||
@@ -311,7 +311,7 @@ class CostTracker:
|
||||
"""
|
||||
r = await self._get_redis()
|
||||
key = f"{self._prefix}:cost:session:{session_id}"
|
||||
data = await r.hgetall(key)
|
||||
data = await r.hgetall(key) # type: ignore[misc]
|
||||
|
||||
# Parse similar to _get_usage_report
|
||||
result: dict[str, Any] = {
|
||||
|
||||
Reference in New Issue
Block a user