Skip to content

Commit 1b50827

Browse files
committed
docs: Correct what Config checks in the retry factory docstrings
Config now validates both intervals, so the factories' guards are no longer the only check. They still matter -- a RetryState can be built without going through Config -- but the docstrings described the old state, where Config ignored initial_reconnect_delay and only clamped poll_interval.
1 parent ea5d3c5 commit 1b50827

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎ldclient/impl/retry.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,8 @@ def for_streaming(initial_reconnect_delay: float) -> RetryState:
257257
healthy operation after establishing a successful connection with no
258258
failures during the ``STREAMING_RESET_INTERVAL``.
259259
260-
``Config`` does not check the configured delay, so the documented default
261-
stands in for anything that is not a positive, finite number.
260+
``Config`` validates the configured delay, so this guard only catches a
261+
state built without it.
262262
263263
The extended regime never starts below the configured delay.
264264
"""
@@ -285,8 +285,8 @@ def for_polling(poll_interval: float) -> RetryState:
285285
schedule. Polling is healthy on any successful poll, and resets after two
286286
in a row.
287287
288-
``Config`` clamps the poll interval, but the documented default stands in
289-
for anything that reaches here and is not a positive, finite number.
288+
``Config`` validates and clamps the poll interval, so this guard only
289+
catches a state built without it.
290290
"""
291291
poll_interval = validate_positive_finite(poll_interval, DEFAULT_POLL_INTERVAL, 'poll_interval', log)
292292
return RetryState(

‎ldclient/testing/impl/test_retry.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ def test_non_error_statuses_are_normal(self, status):
112112

113113

114114
class TestFactoryInputGuards:
115-
"""``Config`` does not check ``initial_reconnect_delay`` at all, and only
116-
clamps ``poll_interval``. A non-positive value would retry with no wait; a
117-
non-finite one makes the jitter arithmetic produce NaN."""
115+
"""A ``RetryState`` can be built without going through ``Config``, so the
116+
factories guard their own input. A non-positive value would retry with no
117+
wait; a non-finite one makes the jitter arithmetic produce NaN."""
118118

119119
@pytest.mark.parametrize(
120120
"configured",

0 commit comments

Comments
 (0)