fix: resolve all mypy type errors for strict type checking (#48)
## Summary Fixed 30 mypy type errors across 8 files to enable strict type checking. ## Changes by Category ### no-any-return errors (fixed with explicit type casts) - alerter/history.py: Cast Redis zcount/zremrangebyscore returns to int - ingestor/clob_client.py: Cast API response values appropriately - ingestor/publisher.py: Cast Redis xack, xlen, xtrim returns to int - ingestor/metadata_sync.py: Cast Redis delete return to int - detector/scorer.py: Cast Redis delete return to int ### operator errors (fixed with null checks) - alerter/formatter.py: Added `if age_hours is not None:` guards ### External library typing issues (fixed with type: ignore) - ingestor/publisher.py: redis-py typing issue with xadd dict parameter - profiler/funding.py: web3 typing issue with block parameters - storage/repos.py: SQLAlchemy Result.rowcount typing issue ### assignment errors (fixed by renaming) - storage/repos.py: Renamed SQLite insert stmt to avoid type conflict Closes #48 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.5
parent
f57e0243dd
commit
5c5440d776
@@ -268,7 +268,7 @@ class RiskScorer:
|
||||
"""
|
||||
key = f"{self._key_prefix}{wallet_address}:{market_id}"
|
||||
deleted = await self._redis.delete(key)
|
||||
return deleted > 0
|
||||
return int(deleted) > 0
|
||||
|
||||
async def assess_batch(self, bundles: list[SignalBundle]) -> list[RiskAssessment]:
|
||||
"""Assess multiple trade bundles.
|
||||
|
||||
Reference in New Issue
Block a user