From c11fc68b271c7bc6a5e4aad69ee3489559b4633a Mon Sep 17 00:00:00 2001 From: Nicholas Bauer Date: Sat, 1 Oct 2022 11:28:40 -0400 Subject: [PATCH] Add methods to access separate keysets of the DefaultsDict (#124) --- RecipesPipeline/src/RecipesPipeline.jl | 4 +++- RecipesPipeline/src/utils.jl | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/RecipesPipeline/src/RecipesPipeline.jl b/RecipesPipeline/src/RecipesPipeline.jl index 2bf23af1b..522508f16 100644 --- a/RecipesPipeline/src/RecipesPipeline.jl +++ b/RecipesPipeline/src/RecipesPipeline.jl @@ -26,7 +26,9 @@ export SliceIt, unzip, dateformatter, datetimeformatter, - timeformatter + timeformatter, + explicitkeys, + defaultkeys # API export warn_on_recipe_aliases, splittable_attribute, diff --git a/RecipesPipeline/src/utils.jl b/RecipesPipeline/src/utils.jl index 7768f32d2..5de461a80 100644 --- a/RecipesPipeline/src/utils.jl +++ b/RecipesPipeline/src/utils.jl @@ -60,6 +60,8 @@ reset_kw!(d::AKW, k) = delete!(d, k) pop_kw!(d::AKW, k) = pop!(d, k) pop_kw!(d::AKW, k, default) = pop!(d, k, default) +explicitkeys(dd::DefaultsDict) = keys(dd.explicit) +defaultkeys(dd::DefaultsDict) = keys(dd.defaults) # -------------------------------- # ## 3D types