Skip to content

Commit aebb521

Browse files
committed
add usage doc
1 parent 860c708 commit aebb521

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

posthog/types.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
import json
22
from dataclasses import dataclass
3-
from typing import Any, List, Optional, TypedDict, Union, cast
3+
from typing import Any, Callable, List, Optional, TypedDict, Union, cast
44

55
FlagValue = Union[bool, str]
66

7+
# Type alias for the before_send callback function
8+
# Takes an event dictionary and returns the modified event or None to drop it
9+
BeforeSendCallback = Callable[[dict[str, Any]], Optional[dict[str, Any]]]
10+
711

812
@dataclass(frozen=True)
913
class FlagReason:

0 commit comments

Comments
 (0)