Skip to content

Commit 1448f4e

Browse files
committed
docs: Trim restating comments and consolidate parity allowlist notes
1 parent 8c91bb5 commit 1448f4e

3 files changed

Lines changed: 5 additions & 12 deletions

File tree

ldclient/async_client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@ async def close(self, close_timeout: float = 2.0) -> None:
183183
except Exception as e:
184184
log.warning("Error closing AsyncLDClient components: %s", e)
185185

186-
# Close HTTP session
187186
if self._session is not None:
188187
try:
189188
await self._session.close()

ldclient/testing/test_async_client.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ async def test_close_is_idempotent():
102102
client = AsyncLDClient(_offline_config())
103103
await client.start()
104104
await client.close()
105-
# Second close should be a no-op
106105
await client.close()
107106

108107

@@ -111,7 +110,6 @@ async def test_context_manager():
111110
"""async with AsyncLDClient(config) as client: starts and closes the client."""
112111
async with AsyncLDClient(_offline_config()) as client:
113112
assert client.is_initialized()
114-
# After exiting, closed flag should be set
115113
assert client._closed is True
116114

117115

ldclient/testing/test_sync_async_parity.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,20 @@ def _public_surface(cls) -> set:
2828

2929

3030
# (sync_cls, async_cls, sync_only, async_only)
31-
# The allowlists document intentionally one-sided public members. Keep them
32-
# small and justified -- every entry is a place the two APIs deliberately differ.
31+
# The allowlists document intentionally one-sided public members, either
32+
# sync-only or async-only. Keep them small and justified -- every entry is a
33+
# place the two APIs deliberately differ.
3334
PAIRS = [
3435
pytest.param(
3536
LDClient, AsyncLDClient,
36-
{"postfork"}, # sync-only: os.fork() recovery hook (no async equivalent)
37-
# async-only: explicit `await start()` lifecycle, and flush_and_wait
38-
# (the sync client only offers fire-and-forget flush()).
37+
{"postfork"},
3938
{"start", "flush_and_wait"},
4039
id="client",
4140
),
4241
pytest.param(
4342
InMemoryFeatureStore, AsyncInMemoryFeatureStore,
4443
set(),
45-
{"close"}, # async-only: the async FeatureStore interface declares
46-
# `async def close()` for resource teardown; the sync
47-
# FeatureStore has no close() (it is hasattr-guarded at
48-
# every call site).
44+
{"close"},
4945
id="feature_store",
5046
),
5147
pytest.param(Evaluator, AsyncEvaluator, set(), set(), id="evaluator"),

0 commit comments

Comments
 (0)