Skip to content

Commit e6393b1

Browse files
committed
Ignore pylint unreachble check
It seems the new pylint gets confused with hypothesis.assume() and thinks it doesn't return, so we need to ignore the check. Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
1 parent 3e83408 commit e6393b1

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tests/test_timer.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ def test_policy_trigger_all_missed(
7070
) -> None:
7171
"""Test the TriggerAllMissed policy."""
7272
hypothesis.assume(now >= scheduled_tick_time)
73+
# It looks like hypothesis let pylint think it is NoReturn
74+
# pylint: disable-next=unreachable
7375
assert (
7476
TriggerAllMissed().calculate_next_tick_time(
7577
now=now, interval=interval, scheduled_tick_time=scheduled_tick_time
@@ -118,6 +120,8 @@ def test_policy_skip_missed_and_resync(
118120
"""Test the SkipMissedAndResync policy."""
119121
hypothesis.assume(now >= scheduled_tick_time)
120122

123+
# It looks like hypothesis let pylint think it is NoReturn
124+
# pylint: disable-next=unreachable
121125
next_tick_time = SkipMissedAndResync().calculate_next_tick_time(
122126
now=now, interval=interval, scheduled_tick_time=scheduled_tick_time
123127
)
@@ -214,6 +218,8 @@ def test_policy_skip_missed_and_drift(
214218
"""Test the SkipMissedAndDrift policy."""
215219
hypothesis.assume(now >= scheduled_tick_time)
216220

221+
# It looks like hypothesis let pylint think it is NoReturn
222+
# pylint: disable-next=unreachable
217223
next_tick_time = SkipMissedAndDrift(
218224
delay_tolerance=timedelta(microseconds=tolerance)
219225
).calculate_next_tick_time(

0 commit comments

Comments
 (0)