Skip to content

Commit 43af6ee

Browse files
committed
Updated types
1 parent 9cac761 commit 43af6ee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

redis/cache.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from abc import ABC, abstractmethod
44
from collections import OrderedDict
55
from enum import Enum
6-
from typing import Any, Collection, Hashable, List, Optional
6+
from typing import Any, Collection, Hashable, List, Optional, Union
77

88

99
class CacheEntryStatus(Enum):
@@ -82,7 +82,7 @@ def get_max_size(self) -> int:
8282
pass
8383

8484
@abstractmethod
85-
def get(self, key: CacheKey) -> CacheEntry | None:
85+
def get(self, key: CacheKey) -> Union[CacheEntry, None]:
8686
pass
8787

8888
@abstractmethod
@@ -159,7 +159,7 @@ def set(self, entry: CacheEntry) -> bool:
159159

160160
return True
161161

162-
def get(self, key: CacheKey) -> CacheEntry | None:
162+
def get(self, key: CacheKey) -> Union[CacheEntry, None]:
163163
entry = self._cache.get(key, None)
164164

165165
if entry is None:

0 commit comments

Comments
 (0)