mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 03:54:52 -04:00
Eliminate a few Any
s in LruCache
type hints (#11453)
This commit is contained in:
parent
432a174bc1
commit
5a0b652d36
4 changed files with 32 additions and 19 deletions
|
@ -84,7 +84,7 @@ class ListNode(Generic[P]):
|
|||
# immediately rather than at the next GC.
|
||||
self.cache_entry = None
|
||||
|
||||
def move_after(self, node: "ListNode") -> None:
|
||||
def move_after(self, node: "ListNode[P]") -> None:
|
||||
"""Move this node from its current location in the list to after the
|
||||
given node.
|
||||
"""
|
||||
|
@ -122,7 +122,7 @@ class ListNode(Generic[P]):
|
|||
self.prev_node = None
|
||||
self.next_node = None
|
||||
|
||||
def _refs_insert_after(self, node: "ListNode") -> None:
|
||||
def _refs_insert_after(self, node: "ListNode[P]") -> None:
|
||||
"""Internal method to insert the node after the given node."""
|
||||
|
||||
# This method should only be called when we're not already in the list.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue