Skip to content

Commit eeba14d

Browse files
committed
fix docstring for set
1 parent 6e00d57 commit eeba14d

File tree

3 files changed

+3
-17
lines changed

3 files changed

+3
-17
lines changed

example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def load_env_file():
193193

194194
print("📦 Testing feature flag payloads...")
195195
print(
196-
f"beta-feature payload: {posthog.get_feature_flag_payload('beta-feature', 'distinct_id')}"
196+
f"beta-feature payload: {posthog.get_feature_flag('reusability', 'distinct_id')}"
197197
)
198198
print(
199199
f"All flags and payloads: {posthog.get_all_flags_and_payloads('distinct_id')}"

posthog/client.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -671,21 +671,7 @@ def set(self, **kwargs: Unpack[OptionalSetArgs]) -> Optional[str]:
671671
Examples:
672672
```python
673673
# Set with distinct id
674-
posthog.capture(
675-
'event_name',
676-
distinct_id='user-distinct-id',
677-
properties={
678-
'$set': {'name': 'Max Hedgehog'},
679-
'$set_once': {'initial_url': '/blog'}
680-
}
681-
)
682-
```
683-
```python
684-
# Set using context
685-
from posthog import new_context, identify_context
686-
with new_context():
687-
identify_context('user-distinct-id')
688-
posthog.capture('event_name')
674+
posthog.set(distinct_id='user123', properties={'name': 'Max Hedgehog'})
689675
```
690676
691677
Category:

posthog/request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
DEFAULT_HOST = US_INGESTION_ENDPOINT
3030
USER_AGENT = "posthog-python/" + VERSION
3131

32-
32+
3333
def determine_server_host(host: Optional[str]) -> str:
3434
"""Determines the server host to use."""
3535
host_or_default = host or DEFAULT_HOST

0 commit comments

Comments
 (0)