Skip to content

Commit 928350a

Browse files
committed
Add type hints
1 parent 0066faa commit 928350a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sentry_sdk/integrations/openfeature.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
try:
77
from openfeature import api
88
from openfeature.hook import Hook
9+
from sentry_sdk._types import Event, ExcInfo
10+
from typing import Optional
911

1012
if TYPE_CHECKING:
1113
from openfeature.flag_evaluation import FlagEvaluationDetails
@@ -19,7 +21,9 @@ class OpenFeatureIntegration(Integration):
1921

2022
@staticmethod
2123
def setup_once():
24+
# type: () -> None
2225
def error_processor(event, exc_info):
26+
# type: (Event, ExcInfo) -> Optional[Event]
2327
scope = sentry_sdk.get_current_scope()
2428
event["contexts"]["flags"] = {"values": scope.flags.get()}
2529
return event

0 commit comments

Comments
 (0)