Skip to content

Commit b3c1f46

Browse files
committed
Don't use the deprecated typing.Callable
Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 63e1f85 commit b3c1f46

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/frequenz/channels/experimental/_grouping_latest_value_cache.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import asyncio
88
import typing
9-
from collections.abc import ItemsView, Iterator, KeysView, Mapping, ValuesView
9+
from collections.abc import Callable, ItemsView, Iterator, KeysView, Mapping, ValuesView
1010

1111
from typing_extensions import override
1212

@@ -82,7 +82,7 @@ def __init__(
8282
self,
8383
receiver: Receiver[ValueT_co],
8484
*,
85-
key: typing.Callable[[ValueT_co], HashableT],
85+
key: Callable[[ValueT_co], HashableT],
8686
unique_id: str | None = None,
8787
) -> None:
8888
"""Create a new cache.
@@ -96,7 +96,7 @@ def __init__(
9696
[`id()`][id]. It is used mostly for debugging purposes.
9797
"""
9898
self._receiver: Receiver[ValueT_co] = receiver
99-
self._key: typing.Callable[[ValueT_co], HashableT] = key
99+
self._key: Callable[[ValueT_co], HashableT] = key
100100
self._unique_id: str = hex(id(self)) if unique_id is None else unique_id
101101
self._latest_value_by_key: dict[HashableT, ValueT_co] = {}
102102
self._task: asyncio.Task[None] = asyncio.create_task(

0 commit comments

Comments
 (0)