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

refactor: improve Hook Hints typing #285

Merged
merged 3 commits into from
Mar 3, 2024

Conversation

gruebel
Copy link
Member

@gruebel gruebel commented Mar 2, 2024

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>
Copy link

codecov bot commented Mar 2, 2024

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
Signed-off-by: gruebel <anton.gruebel@gmail.com>
Signed-off-by: gruebel <anton.gruebel@gmail.com>
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.

LGTM!

@federicobond federicobond merged commit 5acd6a6 into open-feature:main Mar 3, 2024
12 checks passed
@gruebel gruebel deleted the improve-hook-hints branch March 21, 2024 21:24
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