open-feature / python-sdk-contrib

Community contributions for hooks and reference providers in python
https://openfeature.dev
10 stars 11 forks source link

chore: update ruff version to 0.2.1 and remove preview flag #37

Closed federicobond closed 6 months ago

federicobond commented 7 months ago

Matches https://github.com/open-feature/python-sdk/pull/272

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (d8e10c7) 90.55% compared to head (4abf187) 89.92%. Report is 3 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #37 +/- ## ========================================== - Coverage 90.55% 89.92% -0.64% ========================================== Files 8 6 -2 Lines 180 129 -51 ========================================== - Hits 163 116 -47 + Misses 17 13 -4 ``` | [Flag](https://app.codecov.io/gh/open-feature/python-sdk-contrib/pull/37/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-feature) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/open-feature/python-sdk-contrib/pull/37/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-feature) | `89.92% <ø> (-0.64%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-feature#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

gruebel commented 7 months ago

@matthewelwell is is probably a side-effect of the recently released version 0.4.2 with this change open-feature/python-sdk#268. The AbstractProvider class defines get_provider_hooks() as an abstract method with a default implementation, which somehow worked before, but now not anymore, which makes more sense for me

https://github.com/open-feature/python-sdk/blob/f9833ba75390008f1bb3c07149dc41be714a1f78/openfeature/provider/provider.py#L22-L24

either we add this method to the FlagdProvider class or we remove the @abstractmethod from the abstract class.

federicobond commented 7 months ago

Yeah, weird that it worked before. I'm in favor of removing the @abstractmethod decorator from AbstractProvider, as this may have an impact in downstream providers.

federicobond commented 7 months ago

This is now building correctly.

federicobond commented 6 months ago

@gruebel perhaps we can trigger a release after merging this PR?