Skip to content

refactor: improve Hook Hints typing#285

Merged
federicobond merged 3 commits into
open-feature:mainfrom
gruebel:improve-hook-hints
Mar 3, 2024
Merged

refactor: improve Hook Hints typing#285
federicobond merged 3 commits into
open-feature:mainfrom
gruebel:improve-hook-hints

Conversation

@gruebel

@gruebel gruebel commented Mar 2, 2024

Copy link
Copy Markdown
Member

This PR

  • it doesn't really enforce 4.2.2.1, but a type checker will complain, if you try to change a value in the hook hints
  • had to switch from dataclass to a normal class HookContext to make the metadata fields immutable

Signed-off-by: gruebel <anton.gruebel@gmail.com>
@codecov

codecov Bot commented Mar 2, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.71%. Comparing base (141858d) to head (ee982c1).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #285      +/-   ##
==========================================
+ Coverage   94.52%   94.71%   +0.19%     
==========================================
  Files          18       18              
  Lines         493      492       -1     
==========================================
  Hits          466      466              
+ Misses         27       26       -1     
Flag Coverage Δ
unittests 94.71% <100.00%> (+0.19%) ⬆️

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.

@gruebel gruebel changed the title improve Hook Hints typing refactor: improve Hook Hints typing Mar 2, 2024
gruebel added 2 commits March 2, 2024 16:37
Signed-off-by: gruebel <anton.gruebel@gmail.com>
Signed-off-by: gruebel <anton.gruebel@gmail.com>
@gruebel gruebel force-pushed the improve-hook-hints branch from 592effb to ee982c1 Compare March 2, 2024 15:55

@federicobond federicobond left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@federicobond federicobond merged commit 5acd6a6 into open-feature:main Mar 3, 2024
@gruebel gruebel deleted the improve-hook-hints branch March 21, 2024 21:24
kikihakiem pushed a commit to ResalApps/openfeature-python-sdk that referenced this pull request Aug 28, 2025
Fixing the inconsistencies regarding error codes for edge cases, as described in #1679


Signed-off-by: Konvalinka <lea.konvalinka@dynatrace.com>
Co-authored-by: Simon Schrottner <simon.schrottner@dynatrace.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.

2 participants