fix: update type annotations for check_and_fix_namespace

- key: str -> Optional[str] (now handles None input)
- return: str -> Optional[str] (returns None when input is None)

Addresses Greptile review concern about type signature mismatch.
This commit is contained in:
michaelxer 2026-06-15 11:07:22 +07:00
parent fadbcba32d
commit 9d1fcc618f

View file

@ -365,7 +365,7 @@ class RedisCache(BaseCache):
self.redis_async_client = redis_async_client # type: ignore
return redis_async_client
def check_and_fix_namespace(self, key: str) -> str:
def check_and_fix_namespace(self, key: Optional[str]) -> Optional[str]:
"""
Make sure each key starts with the given namespace
"""