Skip to content

Commit c674736

Browse files
authored
Update lru_cache.py
1 parent 4652f19 commit c674736

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

other/lru_cache.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
from __future__ import annotations
22

33
from collections.abc import Callable
4-
from typing import Generic, TypeVar
54

6-
T = TypeVar("T")
7-
U = TypeVar("U")
85

9-
10-
class DoubleLinkedListNode(Generic[T, U]):
6+
class DoubleLinkedListNode[T, U]:
117
"""
128
Double Linked List Node built specifically for LRU Cache
139
@@ -28,7 +24,7 @@ def __repr__(self) -> str:
2824
)
2925

3026

31-
class DoubleLinkedList(Generic[T, U]):
27+
class DoubleLinkedList[T, U]:
3228
"""
3329
Double Linked List built specifically for LRU Cache
3430
@@ -143,7 +139,7 @@ def remove(
143139
return node
144140

145141

146-
class LRUCache(Generic[T, U]):
142+
class LRUCache[T, U]:
147143
"""
148144
LRU Cache to store a given capacity of data. Can be used as a stand-alone object
149145
or as a function decorator.

0 commit comments

Comments
 (0)