Various ruff fixes (#12821)

This commit is contained in:
Christian Clauss
2025-07-06 00:35:29 +02:00
committed by GitHub
parent 7665ba5e25
commit cd3c3c3130
25 changed files with 69 additions and 70 deletions

View File

@ -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 LRU Cache
@ -28,7 +28,7 @@ class DoubleLinkedListNode(Generic[T, U]):
)
class DoubleLinkedList(Generic[T, U]):
class DoubleLinkedList[T, U]:
"""
Double Linked List built specifically for LRU Cache
@ -143,7 +143,7 @@ class DoubleLinkedList(Generic[T, U]):
return node
class LRUCache(Generic[T, U]):
class LRUCache[T, U]:
"""
LRU Cache to store a given capacity of data. Can be used as a stand-alone object
or as a function decorator.