Skip to content

Commit 5446aa6

Browse files
committed
Ignore Raises sections without explicit raise statements
These are either specifying what sub-classes of a base class could do, or are specifying exceptions that are raised indirectly. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 2e50b98 commit 5446aa6

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

src/frequenz/channels/_base_classes.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,9 @@ async def ready(self) -> bool:
194194
"""
195195
return await self._recv.ready() # pylint: disable=protected-access
196196

197-
def consume(self) -> U:
197+
# We need a noqa here because the docs have a Raises section but the code doesn't
198+
# explicitly raise anything.
199+
def consume(self) -> U: # noqa: DOC502
198200
"""Return a transformed value once `ready()` is complete.
199201
200202
Returns:

src/frequenz/channels/util/_timer.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,10 @@ def __init__(
482482
if auto_start:
483483
self.reset(start_delay=start_delay)
484484

485+
# We need a noqa here because the docs have a Raises section but the documented
486+
# exceptions are raised indirectly.
485487
@classmethod
486-
def timeout(
488+
def timeout( # noqa: DOC502
487489
cls,
488490
delay: timedelta,
489491
/,
@@ -530,8 +532,10 @@ def timeout(
530532
loop=loop,
531533
)
532534

535+
# We need a noqa here because the docs have a Raises section but the documented
536+
# exceptions are raised indirectly.
533537
@classmethod
534-
def periodic(
538+
def periodic( # noqa: DOC502
535539
cls,
536540
period: timedelta,
537541
/,
@@ -661,7 +665,9 @@ def stop(self) -> None:
661665
# We need to make sure it's not None, otherwise `ready()` will start it
662666
self._next_tick_time = self._now()
663667

664-
async def ready(self) -> bool:
668+
# We need a noqa here because the docs have a Raises section but the documented
669+
# exceptions are raised indirectly.
670+
async def ready(self) -> bool: # noqa: DOC502
665671
"""Wait until the timer `interval` passed.
666672
667673
Once a call to `ready()` has finished, the resulting tick information

0 commit comments

Comments
 (0)