Merge pull request #14 from mschoenlaub/spec-0.4.0
Remove EvaluationOptions from method signatures
This commit is contained in:
commit
1727554df0
|
|
@ -210,7 +210,6 @@ class OpenFeatureClient:
|
||||||
key,
|
key,
|
||||||
default_value,
|
default_value,
|
||||||
merged_context,
|
merged_context,
|
||||||
flag_evaluation_options,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
after_hooks(type, hook_context, flag_evaluation, merged_hooks, None)
|
after_hooks(type, hook_context, flag_evaluation, merged_hooks, None)
|
||||||
|
|
@ -237,7 +236,6 @@ class OpenFeatureClient:
|
||||||
key: str,
|
key: str,
|
||||||
default_value: typing.Any,
|
default_value: typing.Any,
|
||||||
evaluation_context: EvaluationContext = None,
|
evaluation_context: EvaluationContext = None,
|
||||||
flag_evaluation_options: typing.Any = None,
|
|
||||||
) -> FlagEvaluationDetails:
|
) -> FlagEvaluationDetails:
|
||||||
"""
|
"""
|
||||||
Encapsulated method to create a FlagEvaluationDetail from a specific provider.
|
Encapsulated method to create a FlagEvaluationDetail from a specific provider.
|
||||||
|
|
@ -246,7 +244,6 @@ class OpenFeatureClient:
|
||||||
:param key: the string key of the selected flag
|
:param key: the string key of the selected flag
|
||||||
:param default_value: backup value returned if no result found by the provider
|
:param default_value: backup value returned if no result found by the provider
|
||||||
:param evaluation_context: Information for the purposes of flag evaluation
|
:param evaluation_context: Information for the purposes of flag evaluation
|
||||||
:param flag_evaluation_options: Additional flag evaluation information
|
|
||||||
:return: a FlagEvaluationDetails object with the fully evaluated flag from a
|
:return: a FlagEvaluationDetails object with the fully evaluated flag from a
|
||||||
provider
|
provider
|
||||||
"""
|
"""
|
||||||
|
|
@ -254,7 +251,6 @@ class OpenFeatureClient:
|
||||||
key,
|
key,
|
||||||
default_value,
|
default_value,
|
||||||
evaluation_context,
|
evaluation_context,
|
||||||
flag_evaluation_options,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if not self.provider:
|
if not self.provider:
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import typing
|
|
||||||
from numbers import Number
|
from numbers import Number
|
||||||
|
|
||||||
from open_feature.evaluation_context.evaluation_context import EvaluationContext
|
from open_feature.evaluation_context.evaluation_context import EvaluationContext
|
||||||
|
|
@ -18,7 +17,6 @@ class NoOpProvider(AbstractProvider):
|
||||||
key: str,
|
key: str,
|
||||||
default_value: bool,
|
default_value: bool,
|
||||||
evaluation_context: EvaluationContext = None,
|
evaluation_context: EvaluationContext = None,
|
||||||
flag_evaluation_options: typing.Any = None,
|
|
||||||
):
|
):
|
||||||
return FlagEvaluationDetails(
|
return FlagEvaluationDetails(
|
||||||
key=key,
|
key=key,
|
||||||
|
|
@ -32,7 +30,6 @@ class NoOpProvider(AbstractProvider):
|
||||||
key: str,
|
key: str,
|
||||||
default_value: str,
|
default_value: str,
|
||||||
evaluation_context: EvaluationContext = None,
|
evaluation_context: EvaluationContext = None,
|
||||||
flag_evaluation_options: typing.Any = None,
|
|
||||||
):
|
):
|
||||||
return FlagEvaluationDetails(
|
return FlagEvaluationDetails(
|
||||||
key=key,
|
key=key,
|
||||||
|
|
@ -46,7 +43,6 @@ class NoOpProvider(AbstractProvider):
|
||||||
key: str,
|
key: str,
|
||||||
default_value: Number,
|
default_value: Number,
|
||||||
evaluation_context: EvaluationContext = None,
|
evaluation_context: EvaluationContext = None,
|
||||||
flag_evaluation_options: typing.Any = None,
|
|
||||||
):
|
):
|
||||||
return FlagEvaluationDetails(
|
return FlagEvaluationDetails(
|
||||||
key=key,
|
key=key,
|
||||||
|
|
@ -60,7 +56,6 @@ class NoOpProvider(AbstractProvider):
|
||||||
key: str,
|
key: str,
|
||||||
default_value: dict,
|
default_value: dict,
|
||||||
evaluation_context: EvaluationContext = None,
|
evaluation_context: EvaluationContext = None,
|
||||||
flag_evaluation_options: typing.Any = None,
|
|
||||||
):
|
):
|
||||||
return FlagEvaluationDetails(
|
return FlagEvaluationDetails(
|
||||||
key=key,
|
key=key,
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import typing
|
|
||||||
from abc import abstractmethod
|
from abc import abstractmethod
|
||||||
from numbers import Number
|
from numbers import Number
|
||||||
|
|
||||||
|
|
@ -16,7 +15,6 @@ class AbstractProvider:
|
||||||
key: str,
|
key: str,
|
||||||
default_value: bool,
|
default_value: bool,
|
||||||
evaluation_context: EvaluationContext = EvaluationContext(),
|
evaluation_context: EvaluationContext = EvaluationContext(),
|
||||||
flag_evaluation_options: typing.Any = None,
|
|
||||||
):
|
):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
@ -26,7 +24,6 @@ class AbstractProvider:
|
||||||
key: str,
|
key: str,
|
||||||
default_value: str,
|
default_value: str,
|
||||||
evaluation_context: EvaluationContext = EvaluationContext(),
|
evaluation_context: EvaluationContext = EvaluationContext(),
|
||||||
flag_evaluation_options: typing.Any = None,
|
|
||||||
):
|
):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
@ -36,7 +33,6 @@ class AbstractProvider:
|
||||||
key: str,
|
key: str,
|
||||||
default_value: Number,
|
default_value: Number,
|
||||||
evaluation_context: EvaluationContext = EvaluationContext(),
|
evaluation_context: EvaluationContext = EvaluationContext(),
|
||||||
flag_evaluation_options: typing.Any = None,
|
|
||||||
):
|
):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
@ -46,6 +42,5 @@ class AbstractProvider:
|
||||||
key: str,
|
key: str,
|
||||||
default_value: dict,
|
default_value: dict,
|
||||||
evaluation_context: EvaluationContext = EvaluationContext(),
|
evaluation_context: EvaluationContext = EvaluationContext(),
|
||||||
flag_evaluation_options: typing.Any = None,
|
|
||||||
):
|
):
|
||||||
pass
|
pass
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue