open-feature / python-sdk

Python SDK for OpenFeature
https://openfeature.dev
Apache License 2.0
49 stars 16 forks source link

fix!: raise error if the flag wasn't found using the in-memory provider #228

Closed beeme1mr closed 10 months ago

beeme1mr commented 10 months ago

This PR

Notes

I marked this as a breaking fix because it changes the method signature of the in-memory provider. Since we're sub-1.0, this will be treated as a minor version change, but highlight the change more predominately in the change log.

I originally intended to only remove the duplicate keys in this PR. If you would prefer that I split these into two separate PRs, please let me know.

toddbaert commented 10 months ago

@beeme1mr writes Python now :sunglasses:

federicobond commented 10 months ago

Looks like some of the gherkin tests are failing due to the InMemoryFlag change, could you update those so it's ready to merge?

beeme1mr commented 10 months ago

@federicobond I'll try 😟

beeme1mr commented 10 months ago

It was easier than I thought... perhaps I am a Python developer now 😄

codecov[bot] commented 10 months ago

Codecov Report

Merging #228 (a7a33ac) into main (f74eda0) will increase coverage by 0.21%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #228      +/-   ##
==========================================
+ Coverage   93.63%   93.84%   +0.21%     
==========================================
  Files          16       16              
  Lines         440      439       -1     
==========================================
  Hits          412      412              
+ Misses         28       27       -1     
Flag Coverage Δ
unittests 93.84% <100.00%> (+0.21%) :arrow_up:

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

Files Coverage Δ
openfeature/provider/in_memory_provider.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more