Skip to content

Conversation

@keelerm84
Copy link
Contributor

This PR

Expands the types allowed for reason on FlagEvaluationDetails and FlagResolutionDetails to include both Reason and str types.

Related Issues

Fixes #262

Notes

Related to spec issue: open-feature/spec#236

…gResolutionDetails.reason`

Signed-off-by: Matthew Keeler <mkeeler@launchdarkly.com>
@codecov
Copy link

codecov bot commented Jan 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f1b0839) 93.89% compared to head (fd30717) 93.89%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #264   +/-   ##
=======================================
  Coverage   93.89%   93.89%           
=======================================
  Files          16       16           
  Lines         442      442           
=======================================
  Hits          415      415           
  Misses         27       27           
Flag Coverage Δ
unittests 93.89% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@gruebel gruebel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job 🍻

Copy link
Member

@lukas-reining lukas-reining left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a huge python expert but the change and tests look good!

Copy link
Member

@federicobond federicobond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @keelerm84! Thank you for your contribution. Change LGTM, but I am lost on what the test is supposed to assert.

If it's just a type check then it should be already covered by mypy. Would any of the tests break if you reverted the type change?

Signed-off-by: Matthew Keeler <mkeeler@launchdarkly.com>
@keelerm84
Copy link
Contributor Author

Hi @keelerm84! Thank you for your contribution. Change LGTM, but I am lost on what the test is supposed to assert.

If it's just a type check then it should be already covered by mypy. Would any of the tests break if you reverted the type change?

That's a good point. I've removed the useless test and will rely on mypy as suggested.

@federicobond federicobond merged commit 5ef6ca1 into open-feature:main Jan 29, 2024
@keelerm84 keelerm84 deleted the fix/reason-as-str branch January 29, 2024 17:03
kikihakiem pushed a commit to ResalApps/openfeature-python-sdk that referenced this pull request Aug 28, 2025
Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FlagResolutionDetails reason field should accept any string

5 participants