From c9ccc66d8264a6e2344bee0d11bafabe3217a963 Mon Sep 17 00:00:00 2001 From: luke-belton Date: Sun, 2 Nov 2025 15:42:39 +0000 Subject: [PATCH] fix docstring for `set` --- posthog/client.py | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/posthog/client.py b/posthog/client.py index 1a15337c..74d11934 100644 --- a/posthog/client.py +++ b/posthog/client.py @@ -671,21 +671,7 @@ def set(self, **kwargs: Unpack[OptionalSetArgs]) -> Optional[str]: Examples: ```python # Set with distinct id - posthog.capture( - 'event_name', - distinct_id='user-distinct-id', - properties={ - '$set': {'name': 'Max Hedgehog'}, - '$set_once': {'initial_url': '/blog'} - } - ) - ``` - ```python - # Set using context - from posthog import new_context, identify_context - with new_context(): - identify_context('user-distinct-id') - posthog.capture('event_name') + posthog.set(distinct_id='user123', properties={'name': 'Max Hedgehog'}) ``` Category: