Skip to content

Commit 9d074a1

Browse files
committed
ruff
1 parent c9bd525 commit 9d074a1

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

posthog/client.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,9 @@ def capture_exception(
768768
properties = properties or {}
769769

770770
# Check if this exception has already been captured
771-
if exception is not None and hasattr(exception, "__posthog_exception_captured"):
771+
if exception is not None and hasattr(
772+
exception, "__posthog_exception_captured"
773+
):
772774
self.log.debug("Exception already captured, skipping")
773775
return
774776

@@ -817,7 +819,9 @@ def capture_exception(
817819
if self.log_captured_exceptions:
818820
self.log.exception(exception, extra=kwargs)
819821

820-
res = self.capture(distinct_id, "$exception", properties, context, timestamp, uuid, groups)
822+
res = self.capture(
823+
distinct_id, "$exception", properties, context, timestamp, uuid, groups
824+
)
821825

822826
# Mark the exception as captured to prevent duplicate captures
823827
if exception is not None:

posthog/scopes.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
from contextlib import contextmanager
33
from typing import Any, Callable, Dict, TypeVar, cast
44

5-
_context_stack: contextvars.ContextVar[list] = contextvars.ContextVar("posthog_context_stack", default=[{}])
5+
_context_stack: contextvars.ContextVar[list] = contextvars.ContextVar(
6+
"posthog_context_stack", default=[{}]
7+
)
68

79

810
def _get_current_context() -> Dict[str, Any]:

0 commit comments

Comments
 (0)