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: Allow string values for FlagEvaluationDetails.reason and FlagResolutionDetails.reason #264

Merged
merged 3 commits into from
Jan 29, 2024
Merged
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 openfeature/flag_evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class FlagEvaluationDetails(typing.Generic[T_co]):
value: T_co
variant: typing.Optional[str] = None
flag_metadata: FlagMetadata = field(default_factory=dict)
reason: typing.Optional[Reason] = None
reason: typing.Optional[typing.Union[str, Reason]] = None
error_code: typing.Optional[ErrorCode] = None
error_message: typing.Optional[str] = None

Expand All @@ -59,6 +59,6 @@ class FlagResolutionDetails(typing.Generic[U_co]):
value: U_co
error_code: typing.Optional[ErrorCode] = None
error_message: typing.Optional[str] = None
reason: typing.Optional[Reason] = None
reason: typing.Optional[typing.Union[str, Reason]] = None
variant: typing.Optional[str] = None
flag_metadata: FlagMetadata = field(default_factory=dict)
Loading