File tree Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Original file line number Diff line number Diff line change 22import typing
33from collections .abc import Awaitable , Sequence
44from dataclasses import dataclass
5- from functools import reduce
65from itertools import chain
76
87from openfeature import _event_support
@@ -509,21 +508,9 @@ def _run_before_hooks_and_update_context(
509508 flag_type , merged_hooks_and_context , hook_hints
510509 )
511510
512- if not merged_hooks_and_context :
513- return evaluation_context .merge (before_hooks_context )
514-
515511 # The hook_context.evaluation_context already contains the merged context from
516512 # _establish_hooks_and_provider, so we just need to merge with the before hooks result
517- merged_context = reduce (
518- lambda a , b : a .merge (b ),
519- [
520- hook_context .evaluation_context
521- for (_ , hook_context ) in merged_hooks_and_context
522- ],
523- )
524- merged_context = merged_context .merge (before_hooks_context )
525-
526- return merged_context
513+ return evaluation_context .merge (before_hooks_context )
527514
528515 @typing .overload
529516 async def evaluate_flag_details_async (
You can’t perform that action at this time.
0 commit comments