Skip to content

Commit 530fe9a

Browse files
committed
Make the message argument to send() positional-only
Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 040c845 commit 530fe9a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/frequenz/channels/_anycast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ def __init__(self, channel: Anycast[_T], /) -> None:
318318
self._channel: Anycast[_T] = channel
319319
"""The channel that this sender belongs to."""
320320

321-
async def send(self, message: _T) -> None:
321+
async def send(self, message: _T, /) -> None:
322322
"""Send a message across the channel.
323323
324324
To send, this method inserts the message into the Anycast channel's

src/frequenz/channels/_broadcast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ def __init__(self, channel: Broadcast[_T], /) -> None:
317317
self._channel: Broadcast[_T] = channel
318318
"""The broadcast channel this sender belongs to."""
319319

320-
async def send(self, message: _T) -> None:
320+
async def send(self, message: _T, /) -> None:
321321
"""Send a message to all broadcast receivers.
322322
323323
Args:

src/frequenz/channels/_sender.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class Sender(ABC, Generic[_T_contra]):
6161
"""An endpoint to sends messages."""
6262

6363
@abstractmethod
64-
async def send(self, message: _T_contra) -> None:
64+
async def send(self, message: _T_contra, /) -> None:
6565
"""Send a message.
6666
6767
Args:

0 commit comments

Comments
 (0)