Skip to content

Commit 8b7a65b

Browse files
committed
Improve the wording
Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 41a3912 commit 8b7a65b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/frequenz/channels/_receiver.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ async def __anext__(self) -> _T_co:
151151
"""Await the next value in the async iteration over received values.
152152
153153
Returns:
154-
The next value received.
154+
The next received value.
155155
156156
Raises:
157157
StopAsyncIteration: If the receiver stopped producing messages.
@@ -226,7 +226,7 @@ async def receive(self) -> _T_co:
226226
return received
227227

228228
def map(self, call: Callable[[_T_co], _U_co]) -> Receiver[_U_co]:
229-
"""Return a receiver with `call` applied on incoming messages.
229+
"""Map a function on the received values.
230230
231231
Tip:
232232
The returned receiver type won't have all the methods of the original
@@ -238,7 +238,7 @@ def map(self, call: Callable[[_T_co], _U_co]) -> Receiver[_U_co]:
238238
call: The function to apply on incoming messages.
239239
240240
Returns:
241-
A `Receiver` to read results of the given function from.
241+
A new receiver that applies the function on the received values.
242242
"""
243243
return _Map(self, call)
244244

@@ -291,13 +291,13 @@ def __init__(
291291
292292
Args:
293293
receiver: The input receiver.
294-
transform: The function to run on the input data.
294+
transform: The function to apply on the input data.
295295
"""
296296
self._receiver: Receiver[_T_co] = receiver
297297
"""The input receiver."""
298298

299299
self._transform: Callable[[_T_co], _U_co] = transform
300-
"""The function to run on the input data."""
300+
"""The function to apply on the input data."""
301301

302302
async def ready(self) -> bool:
303303
"""Wait until the receiver is ready with a value or an error.

src/frequenz/channels/_select.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def __repr__(self) -> str:
260260
def selected_from(
261261
selected: Selected[Any], receiver: Receiver[_T]
262262
) -> TypeGuard[Selected[_T]]:
263-
"""Check if the given receiver was selected by [`select()`][frequenz.channels.select].
263+
"""Check whether the given receiver was selected by [`select()`][frequenz.channels.select].
264264
265265
This function is used in conjunction with the
266266
[`Selected`][frequenz.channels.Selected] class to determine which receiver was

0 commit comments

Comments
 (0)