Skip to content

Commit 4f3b43c

Browse files
committed
fix: mypy unpacking of None
1 parent e88e357 commit 4f3b43c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

posthog/ai/openai/openai.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def _capture_streaming_event(
193193
"$ai_latency": latency,
194194
"$ai_trace_id": posthog_trace_id,
195195
"$ai_base_url": str(self._client.base_url),
196-
**posthog_properties,
196+
**(posthog_properties or {}),
197197
}
198198

199199
if tool_calls:
@@ -266,7 +266,7 @@ def create(
266266
"$ai_latency": latency,
267267
"$ai_trace_id": posthog_trace_id,
268268
"$ai_base_url": str(self._client.base_url),
269-
**posthog_properties,
269+
**(posthog_properties or {}),
270270
}
271271

272272
if posthog_distinct_id is None:

posthog/ai/openai/openai_async.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ async def _capture_streaming_event(
191191
"$ai_latency": latency,
192192
"$ai_trace_id": posthog_trace_id,
193193
"$ai_base_url": str(self._client.base_url),
194-
**posthog_properties,
194+
**(posthog_properties or {}),
195195
}
196196

197197
if tool_calls:
@@ -266,7 +266,7 @@ async def create(
266266
"$ai_latency": latency,
267267
"$ai_trace_id": posthog_trace_id,
268268
"$ai_base_url": str(self._client.base_url),
269-
**posthog_properties,
269+
**(posthog_properties or {}),
270270
}
271271

272272
if posthog_distinct_id is None:

0 commit comments

Comments
 (0)