fix: object client methods can receive dict or list as default_value (#134)
Signed-off-by: Federico Bond <federicobond@gmail.com>
This commit is contained in:
parent
d31b531ae8
commit
291581fbce
|
|
@ -182,7 +182,7 @@ class OpenFeatureClient:
|
||||||
def get_object_value(
|
def get_object_value(
|
||||||
self,
|
self,
|
||||||
flag_key: str,
|
flag_key: str,
|
||||||
default_value: dict,
|
default_value: typing.Union[dict, list],
|
||||||
evaluation_context: typing.Optional[EvaluationContext] = None,
|
evaluation_context: typing.Optional[EvaluationContext] = None,
|
||||||
flag_evaluation_options: typing.Optional[FlagEvaluationOptions] = None,
|
flag_evaluation_options: typing.Optional[FlagEvaluationOptions] = None,
|
||||||
) -> dict:
|
) -> dict:
|
||||||
|
|
@ -197,7 +197,7 @@ class OpenFeatureClient:
|
||||||
def get_object_details(
|
def get_object_details(
|
||||||
self,
|
self,
|
||||||
flag_key: str,
|
flag_key: str,
|
||||||
default_value: dict,
|
default_value: typing.Union[dict, list],
|
||||||
evaluation_context: typing.Optional[EvaluationContext] = None,
|
evaluation_context: typing.Optional[EvaluationContext] = None,
|
||||||
flag_evaluation_options: typing.Optional[FlagEvaluationOptions] = None,
|
flag_evaluation_options: typing.Optional[FlagEvaluationOptions] = None,
|
||||||
) -> FlagEvaluationDetails:
|
) -> FlagEvaluationDetails:
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,11 @@ def test_should_get_flag_value_based_on_method_type(
|
||||||
},
|
},
|
||||||
"get_object_details",
|
"get_object_details",
|
||||||
),
|
),
|
||||||
|
(
|
||||||
|
list,
|
||||||
|
["string1", "string2"],
|
||||||
|
"get_object_details",
|
||||||
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
def test_should_get_flag_detail_based_on_method_type(
|
def test_should_get_flag_detail_based_on_method_type(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue