Skip to content

Commit 165d97c

Browse files
committed
fix typing
1 parent 6edc020 commit 165d97c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

flag_engine/segments/evaluator.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,8 +390,13 @@ def _get_context_value_getter(
390390
)
391391

392392
def getter(context: EvaluationContext) -> ContextValue:
393+
if typing.TYPE_CHECKING: # pragma: no cover
394+
# Ugly hack to satisfy mypy :(
395+
data = dict(context)
396+
else:
397+
data = context
393398
try:
394-
if result := compiled_query.find_one(context):
399+
if result := compiled_query.find_one(data):
395400
if is_trait_value(value := result.value):
396401
return value
397402
return None

0 commit comments

Comments
 (0)