Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: object client methods can receive dict or list as default_value #134

Merged
merged 1 commit into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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