Skip to content

Commit a155e1d

Browse files
authored
fix docstring for set (#364)
1 parent f648a5d commit a155e1d

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

posthog/client.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -725,21 +725,7 @@ def set(self, **kwargs: Unpack[OptionalSetArgs]) -> Optional[str]:
725725
Examples:
726726
```python
727727
# Set with distinct id
728-
posthog.capture(
729-
'event_name',
730-
distinct_id='user-distinct-id',
731-
properties={
732-
'$set': {'name': 'Max Hedgehog'},
733-
'$set_once': {'initial_url': '/blog'}
734-
}
735-
)
736-
```
737-
```python
738-
# Set using context
739-
from posthog import new_context, identify_context
740-
with new_context():
741-
identify_context('user-distinct-id')
742-
posthog.capture('event_name')
728+
posthog.set(distinct_id='user123', properties={'name': 'Max Hedgehog'})
743729
```
744730
745731
Category:

0 commit comments

Comments
 (0)