Skip to content

Commit 98ad550

Browse files
committed
Make ReceiverFetcher compatible with Broadcast
There was a small mismatch in the type of `new_receiver` between `ReceiverFetcher` and a `Broadcast` channel. By harmonizing the two we can just use channels directly as receiver fetchers without the need of an adaptor class. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 25685be commit 98ad550

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/frequenz/sdk/_internal/_channels.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class ReceiverFetcher(typing.Generic[T], typing.Protocol):
1616
"""An interface that just exposes a `new_receiver` method."""
1717

1818
@abc.abstractmethod
19-
def new_receiver(self, maxsize: int = 50) -> Receiver[T]:
19+
def new_receiver(self, *, maxsize: int = 50) -> Receiver[T]:
2020
"""Get a receiver from the channel.
2121
2222
Args:

0 commit comments

Comments
 (0)