mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-21 20:47:10 +08:00
Various ruff fixes (#12821)
This commit is contained in:
@ -1,13 +1,13 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Callable
|
||||
from typing import Generic, TypeVar
|
||||
from typing import TypeVar
|
||||
|
||||
T = TypeVar("T")
|
||||
U = TypeVar("U")
|
||||
|
||||
|
||||
class DoubleLinkedListNode(Generic[T, U]):
|
||||
class DoubleLinkedListNode[T, U]:
|
||||
"""
|
||||
Double Linked List Node built specifically for LFU Cache
|
||||
|
||||
@ -30,7 +30,7 @@ class DoubleLinkedListNode(Generic[T, U]):
|
||||
)
|
||||
|
||||
|
||||
class DoubleLinkedList(Generic[T, U]):
|
||||
class DoubleLinkedList[T, U]:
|
||||
"""
|
||||
Double Linked List built specifically for LFU Cache
|
||||
|
||||
@ -161,7 +161,7 @@ class DoubleLinkedList(Generic[T, U]):
|
||||
return node
|
||||
|
||||
|
||||
class LFUCache(Generic[T, U]):
|
||||
class LFUCache[T, U]:
|
||||
"""
|
||||
LFU Cache to store a given capacity of data. Can be used as a stand-alone object
|
||||
or as a function decorator.
|
||||
|
Reference in New Issue
Block a user