We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4652f19 commit c674736Copy full SHA for c674736
1 file changed
other/lru_cache.py
@@ -1,13 +1,9 @@
1
from __future__ import annotations
2
3
from collections.abc import Callable
4
-from typing import Generic, TypeVar
5
6
-T = TypeVar("T")
7
-U = TypeVar("U")
8
9
-
10
-class DoubleLinkedListNode(Generic[T, U]):
+class DoubleLinkedListNode[T, U]:
11
"""
12
Double Linked List Node built specifically for LRU Cache
13
@@ -28,7 +24,7 @@ def __repr__(self) -> str:
28
24
)
29
25
30
26
31
-class DoubleLinkedList(Generic[T, U]):
27
+class DoubleLinkedList[T, U]:
32
33
Double Linked List built specifically for LRU Cache
34
@@ -143,7 +139,7 @@ def remove(
143
139
return node
144
140
145
141
146
-class LRUCache(Generic[T, U]):
142
+class LRUCache[T, U]:
147
148
LRU Cache to store a given capacity of data. Can be used as a stand-alone object
149
or as a function decorator.
0 commit comments