keyv - feat: adding in hooks for clear and disconnect#1924
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1924 +/- ##
===========================================
+ Coverage 99.94% 100.00% +0.05%
===========================================
Files 40 40
Lines 3974 3978 +4
Branches 641 641
===========================================
+ Hits 3972 3978 +6
+ Misses 2 0 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request introduces new lifecycle hooks for the clear and disconnect methods in the Keyv class, specifically BEFORE_CLEAR, AFTER_CLEAR, BEFORE_DISCONNECT, and AFTER_DISCONNECT. It also updates the KeyvHooks enum and adds unit tests to verify the execution of these hooks. The review feedback suggests passing a context object (e.g., containing the namespace) to these hooks to ensure consistency with existing hook implementations and to facilitate future metadata additions without breaking the API.
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
keyv - feat: adding in hooks for clear and disconnect