Skip to content

Commit b90a7a9

Browse files
committed
Fix mypy errors
I don't think we introduced these, but might as well fix them.
1 parent ae6f5f9 commit b90a7a9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

posthog/client.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,10 @@ def get_identity_state(passed) -> tuple[str, bool]:
8787
return (str(uuid4()), True)
8888

8989

90-
def add_context_tags(properties):
90+
def add_context_tags(properties: Optional[Dict[str, Any]]) -> Dict[str, Any]:
91+
if properties is None:
92+
properties = {}
93+
9194
current_context = _get_current_context()
9295
if current_context:
9396
context_tags = current_context.collect_tags()
@@ -532,7 +535,7 @@ def capture(
532535
if personless and "$process_person_profile" not in properties:
533536
properties["$process_person_profile"] = False
534537

535-
msg = {
538+
msg: Dict[str, Any] = {
536539
"properties": properties,
537540
"timestamp": timestamp,
538541
"distinct_id": distinct_id,

0 commit comments

Comments
 (0)