From d45d0a424e01297c5eb2f9f40b262081f40c7876 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 1 Mar 2026 15:22:50 +0000 Subject: [PATCH] fix: add type: ignore for redis.scan() mypy false positive in cache.py redis.Redis.scan() returns a tuple at runtime but mypy infers Awaitable[Any] from the generic ResponseT return type, causing a "not iterable" error on tuple unpacking. Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com> --- app/utils/cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/utils/cache.py b/app/utils/cache.py index 70307970..6be1662b 100644 --- a/app/utils/cache.py +++ b/app/utils/cache.py @@ -113,7 +113,7 @@ def cache_delete_pattern(pattern: str) -> None: full_pattern = f"{_KEY_PREFIX}{pattern}" cursor = 0 while True: - cursor, keys = client.scan(cursor, match=full_pattern, count=100) + cursor, keys = client.scan(cursor, match=full_pattern, count=100) # type: ignore[misc] # sync Redis returns tuple if keys: client.delete(*keys) if cursor == 0: