From 16e2c214c05237490b98814c350f2d8d7be84e79 Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Thu, 31 Jul 2025 09:52:34 +0200 Subject: [PATCH 1/3] test From e3df3e98b2bd60602aef12ced82f5f1c6ce24333 Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Thu, 31 Jul 2025 09:56:11 +0200 Subject: [PATCH 2/3] follow the signature in the sdk --- sentry_sdk/integrations/openfeature.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sentry_sdk/integrations/openfeature.py b/sentry_sdk/integrations/openfeature.py index e2b33d83f2..1e4f915a9a 100644 --- a/sentry_sdk/integrations/openfeature.py +++ b/sentry_sdk/integrations/openfeature.py @@ -25,9 +25,8 @@ def setup_once(): class OpenFeatureHook(Hook): - def after(self, hook_context, details, hints): - # type: (HookContext, FlagEvaluationDetails[bool], HookHints) -> None + # type: (HookContext, FlagEvaluationDetails, dict) -> None if isinstance(details.value, bool): add_feature_flag(details.flag_key, details.value) From ffcb201c93854b80526bcfabe450326f5337923a Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Thu, 31 Jul 2025 09:58:00 +0200 Subject: [PATCH 3/3] . --- sentry_sdk/integrations/openfeature.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sentry_sdk/integrations/openfeature.py b/sentry_sdk/integrations/openfeature.py index 1e4f915a9a..3ac73edd93 100644 --- a/sentry_sdk/integrations/openfeature.py +++ b/sentry_sdk/integrations/openfeature.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING +from typing import TYPE_CHECKING, Any from sentry_sdk.feature_flags import add_feature_flag from sentry_sdk.integrations import DidNotEnable, Integration @@ -8,7 +8,6 @@ from openfeature.hook import Hook if TYPE_CHECKING: - from openfeature.flag_evaluation import FlagEvaluationDetails from openfeature.hook import HookContext, HookHints except ImportError: raise DidNotEnable("OpenFeature is not installed") @@ -26,7 +25,7 @@ def setup_once(): class OpenFeatureHook(Hook): def after(self, hook_context, details, hints): - # type: (HookContext, FlagEvaluationDetails, dict) -> None + # type: (Any, Any, Any) -> None if isinstance(details.value, bool): add_feature_flag(details.flag_key, details.value)