-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add the @has_preference
and @delete_preferences
convenience functions and macros
#6
Add the @has_preference
and @delete_preferences
convenience functions and macros
#6
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, this looks perfect.
EDIT: this is done now. |
Codecov Report
@@ Coverage Diff @@
## master #6 +/- ##
==========================================
- Coverage 81.81% 76.69% -5.12%
==========================================
Files 2 2
Lines 88 103 +15
==========================================
+ Hits 72 79 +7
- Misses 16 24 +8
Continue to review full report at Codecov.
|
Alright, should be ready for another round of review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious about this.
Hmm, GitHub seems to be having some troubles. Issue is that |
Oh that's definitely a bug. |
It shouldn't take a |
xref #29 |
Fixes #4
This pull request adds the following convenience functions, with associated convenience macros:
@has_preference
@delete_preferences
@has_preference
is pretty straightforward - if the result of@load_preference
isnothing
, it returnsfalse
, otherwise it returnstrue
.For
@delete_preferences
, there is a keyword argumentblock_inheritance
. Ifblock_inheritance
isfalse
(which is the default), then we call@set_preferences
withmissing
as the value for each given preference key. Ifblock_inheritance
istrue
, then we call@set_preferences
withnothing
as the value for each given preference key.