Skip to content

Commit

Permalink
fix/flag-error-message: Rename flag_key in provider.py to match spec
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>

Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>
  • Loading branch information
ajhelsby committed Oct 18, 2022
1 parent bcbf4e9 commit c7d5b47
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions open_feature/provider/no_op_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,51 +14,51 @@ def get_name(self) -> str:

def get_boolean_details(
self,
key: str,
flag_key: str,
default_value: bool,
evaluation_context: EvaluationContext = None,
):
return FlagEvaluationDetails(
flag_key=key,
flag_key=flag_key,
value=default_value,
reason=Reason.DEFAULT,
variant=PASSED_IN_DEFAULT,
)

def get_string_details(
self,
key: str,
flag_key: str,
default_value: str,
evaluation_context: EvaluationContext = None,
):
return FlagEvaluationDetails(
flag_key=key,
flag_key=flag_key,
value=default_value,
reason=Reason.DEFAULT,
variant=PASSED_IN_DEFAULT,
)

def get_number_details(
self,
key: str,
flag_key: str,
default_value: Number,
evaluation_context: EvaluationContext = None,
):
return FlagEvaluationDetails(
flag_key=key,
flag_key=flag_key,
value=default_value,
reason=Reason.DEFAULT,
variant=PASSED_IN_DEFAULT,
)

def get_object_details(
self,
key: str,
flag_key: str,
default_value: dict,
evaluation_context: EvaluationContext = None,
):
return FlagEvaluationDetails(
flag_key=key,
flag_key=flag_key,
value=default_value,
reason=Reason.DEFAULT,
variant=PASSED_IN_DEFAULT,
Expand Down
8 changes: 4 additions & 4 deletions open_feature/provider/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def get_name(self) -> str:
@abstractmethod
def get_boolean_details(
self,
key: str,
flag_key: str,
default_value: bool,
evaluation_context: EvaluationContext = EvaluationContext(),
):
Expand All @@ -21,7 +21,7 @@ def get_boolean_details(
@abstractmethod
def get_string_details(
self,
key: str,
flag_key: str,
default_value: str,
evaluation_context: EvaluationContext = EvaluationContext(),
):
Expand All @@ -30,7 +30,7 @@ def get_string_details(
@abstractmethod
def get_number_details(
self,
key: str,
flag_key: str,
default_value: Number,
evaluation_context: EvaluationContext = EvaluationContext(),
):
Expand All @@ -39,7 +39,7 @@ def get_number_details(
@abstractmethod
def get_object_details(
self,
key: str,
flag_key: str,
default_value: dict,
evaluation_context: EvaluationContext = EvaluationContext(),
):
Expand Down

0 comments on commit c7d5b47

Please sign in to comment.