Skip to content

Commit

Permalink
fix: object client methods can receive dict or list as default_value (#…
Browse files Browse the repository at this point in the history
…134)

Signed-off-by: Federico Bond <federicobond@gmail.com>
  • Loading branch information
federicobond authored Jul 6, 2023
1 parent d31b531 commit 291581f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions open_feature/open_feature_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def get_float_details(
def get_object_value(
self,
flag_key: str,
default_value: dict,
default_value: typing.Union[dict, list],
evaluation_context: typing.Optional[EvaluationContext] = None,
flag_evaluation_options: typing.Optional[FlagEvaluationOptions] = None,
) -> dict:
Expand All @@ -197,7 +197,7 @@ def get_object_value(
def get_object_details(
self,
flag_key: str,
default_value: dict,
default_value: typing.Union[dict, list],
evaluation_context: typing.Optional[EvaluationContext] = None,
flag_evaluation_options: typing.Optional[FlagEvaluationOptions] = None,
) -> FlagEvaluationDetails:
Expand Down
5 changes: 5 additions & 0 deletions tests/test_open_feature_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ def test_should_get_flag_value_based_on_method_type(
},
"get_object_details",
),
(
list,
["string1", "string2"],
"get_object_details",
),
),
)
def test_should_get_flag_detail_based_on_method_type(
Expand Down

0 comments on commit 291581f

Please sign in to comment.