From e10e7fa03842b83e8d3841cf234455e21a3b1391 Mon Sep 17 00:00:00 2001 From: Mandeep Cheema Date: Sat, 9 May 2026 13:27:39 +0100 Subject: [PATCH 1/2] fix type warning on `new_context` --- posthog/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/posthog/__init__.py b/posthog/__init__.py index edbe2226..3209de82 100644 --- a/posthog/__init__.py +++ b/posthog/__init__.py @@ -73,7 +73,11 @@ """Context management.""" -def new_context(fresh=False, capture_exceptions=True, client=None): +def new_context( + fresh: bool = False, + capture_exceptions: bool = True, + client: Optional[Client] = None, +): """ Create a new context scope that will be active for the duration of the with block. From 55fc78f67525b7193a1ddb3f7d81ebd83893f6c2 Mon Sep 17 00:00:00 2001 From: Manoel Aranda Neto Date: Sat, 9 May 2026 18:07:43 -0400 Subject: [PATCH 2/2] changeset --- .sampo/changesets/forthright-guardian-sampsa.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .sampo/changesets/forthright-guardian-sampsa.md diff --git a/.sampo/changesets/forthright-guardian-sampsa.md b/.sampo/changesets/forthright-guardian-sampsa.md new file mode 100644 index 00000000..2add4e84 --- /dev/null +++ b/.sampo/changesets/forthright-guardian-sampsa.md @@ -0,0 +1,5 @@ +--- +pypi/posthog: patch +--- + +fix: type warning on new_context