Skip to content

Commit 010506d

Browse files
committed
Use anext() instead of __anext__()
`pylint` doesn't like calling dunder methods explicitly and `anext()` was added in Python 3.10. Since we depend on Python 3.11 we can just use `anext()` and make `pylint` happy. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent a427b2b commit 010506d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/frequenz/channels/_receiver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ async def receive(self) -> ReceiverMessageT_co: # noqa: DOC503
230230
ReceiverError: If there is some problem with the receiver.
231231
"""
232232
try:
233-
received = await self.__anext__() # pylint: disable=unnecessary-dunder-call
233+
received = await anext(self)
234234
except StopAsyncIteration as exc:
235235
# If we already had a cause and it was the receiver was stopped,
236236
# then reuse that error, as StopAsyncIteration is just an artifact

0 commit comments

Comments
 (0)