From 3abab56d356d7bc78c672ea5609394e38acc84c3 Mon Sep 17 00:00:00 2001 From: lostmartian Date: Sat, 15 Aug 2026 00:58:49 +0530 Subject: [PATCH] fix(caching): annotate increment-if-present ttl as float PYI041: int | float collapses to float since int is a subtype. --- litellm/caching/redis_cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/caching/redis_cache.py b/litellm/caching/redis_cache.py index 41e2ff94b13..d0e8f08eef9 100644 --- a/litellm/caching/redis_cache.py +++ b/litellm/caching/redis_cache.py @@ -1038,7 +1038,7 @@ class RedisCache(BaseCache): self, key: str, value: float, - ttl: int | float | None = None, + ttl: float | None = None, ) -> float | None: """Atomically increment ``key`` by ``value`` only when the key already exists, returning the new value; an absent key is left missing and