Skip to content

Commit a427b2b

Browse files
committed
Import symbols in the top-level namespace
Some tools are not smart enough to do proper semantic analysis. That is the case for `pydoclint`, so it can't figure out that `_receiver.ReceiverStoppedError` is what we want to document. To make things simpler we just import the individual symbols to the top-level namespace. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent b776670 commit a427b2b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/frequenz/channels/event.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616

1717
import asyncio as _asyncio
1818

19-
from frequenz.channels import _receiver
19+
from frequenz.channels._receiver import Receiver, ReceiverStoppedError
2020

2121

22-
class Event(_receiver.Receiver[None]):
22+
class Event(Receiver[None]):
2323
"""A receiver that can be made ready directly.
2424
2525
# Usage
@@ -161,7 +161,7 @@ def consume(self) -> None:
161161
ReceiverStoppedError: If this receiver is stopped.
162162
"""
163163
if not self._is_set and self._is_stopped:
164-
raise _receiver.ReceiverStoppedError(self)
164+
raise ReceiverStoppedError(self)
165165

166166
assert self._is_set, "calls to `consume()` must be follow a call to `ready()`"
167167

0 commit comments

Comments
 (0)