mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
fix: revert check_and_fix_namespace type signature to str to fix MyPy downstream errors
This commit is contained in:
parent
9d1fcc618f
commit
6a93f6e67a
1 changed files with 2 additions and 2 deletions
|
|
@ -365,12 +365,12 @@ class RedisCache(BaseCache):
|
|||
self.redis_async_client = redis_async_client # type: ignore
|
||||
return redis_async_client
|
||||
|
||||
def check_and_fix_namespace(self, key: Optional[str]) -> Optional[str]:
|
||||
def check_and_fix_namespace(self, key: str) -> str:
|
||||
"""
|
||||
Make sure each key starts with the given namespace
|
||||
"""
|
||||
if key is None:
|
||||
return key
|
||||
return key # type: ignore[return-value]
|
||||
if self.namespace is not None and not key.startswith(self.namespace):
|
||||
key = self.namespace + ":" + key
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue