From 53f47b1537685f2577c584a43ebe41e7634d635e Mon Sep 17 00:00:00 2001 From: ChuckBuilds Date: Sun, 2 Aug 2026 10:11:50 -0400 Subject: [PATCH] docs(sports): type-hint game_update_timestamps to match its sibling Addresses the last remaining sub-point on the modes.py review thread. The design finding itself is already handled: the base class documents that it only reads game_update_timestamps and that a subclass's update() owns writing "last_seen" (and afl/etc. do, so stale-game eviction works in practice). The one concrete gap was the missing annotation -- _zero_clock_timestamps is typed Dict[str, float] while this nested map had none. Now Dict[str, Dict[str, float]]. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01KEZK1P1Q1fu5pcuVrkrCFZ --- src/base_classes/sports/modes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base_classes/sports/modes.py b/src/base_classes/sports/modes.py index 615ad1a7..06e73467 100644 --- a/src/base_classes/sports/modes.py +++ b/src/base_classes/sports/modes.py @@ -847,7 +847,7 @@ class SportsLive(SportsCore): # feed: {game_id: {"clock": ts, "score": ts, "last_seen": ts}}. # Until a subclass writes "last_seen", the staleness branch of # _detect_stale_games is inert and only the game-over check applies. - self.game_update_timestamps = {} + self.game_update_timestamps: Dict[str, Dict[str, float]] = {} self.stale_game_timeout = self.mode_config.get("stale_game_timeout", 300) # 5 minutes default @abstractmethod