Skip to content

Commit 22d1024

Browse files
committed
Add doc references
1 parent cec37dc commit 22d1024

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

sentry_sdk/integrations/launchdarkly.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,15 @@ class LaunchDarklyIntegration(Integration):
2323

2424
def __init__(self, client=None):
2525
# type: (LDClient | None) -> None
26+
"""
27+
@param client An initialized LDClient instance. If a client is not provided, this integration will attempt to
28+
use the shared global instance. This will fail if ldclient.set_config() hasn't been called.
29+
30+
Docs reference: https://docs.launchdarkly.com/sdk/server-side/python
31+
"""
2632
if client is None:
2733
try:
28-
client = (
29-
ldclient.get()
30-
) # global singleton. Fails if set_config hasn't been called.
34+
client = ldclient.get() # global singleton.
3135
except Exception as exc:
3236
raise DidNotEnable("Error getting LaunchDarkly client. " + repr(exc))
3337

tests/integrations/launchdarkly/test_launchdarkly.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
from sentry_sdk.integrations import DidNotEnable
1515
from sentry_sdk.integrations.launchdarkly import LaunchDarklyIntegration
1616

17+
# Docs reference: https://launchdarkly-python-sdk.readthedocs.io/en/latest/api-testing.html#ldclient.integrations.test_data.TestData
18+
1719

1820
@pytest.mark.parametrize(
1921
"use_global_client",

0 commit comments

Comments
 (0)