From 87aa36a2ec2bdb7000e2c3a1b4c1978ca2fce171 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Thu, 23 Nov 2023 13:21:38 -0800 Subject: [PATCH] fix(caching.py): fix linting issues --- litellm/caching.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/litellm/caching.py b/litellm/caching.py index f87c0f122a..2a042dcbf8 100644 --- a/litellm/caching.py +++ b/litellm/caching.py @@ -10,6 +10,7 @@ import litellm import time, logging import json, traceback, ast +from typing import Optional def get_prompt(*args, **kwargs): # make this safe checks, it should not throw any exceptions @@ -102,7 +103,7 @@ class DualCache(BaseCache): When data is updated or inserted, it is written to both the in-memory cache + Redis. This ensures that even if Redis hasn't been updated yet, the in-memory cache reflects the most recent data. """ - def __init__(self, in_memory_cache: InMemoryCache =None, redis_cache: RedisCache =None) -> None: + def __init__(self, in_memory_cache: Optional[InMemoryCache] =None, redis_cache: Optional[RedisCache] =None) -> None: super().__init__() # If in_memory_cache is not provided, use the default InMemoryCache self.in_memory_cache = in_memory_cache or InMemoryCache()