Skip to content

Commit e6b42a0

Browse files
committed
remove unused helper variant and fix bug
1 parent 5b51494 commit e6b42a0

File tree

8 files changed

+21
-302
lines changed

8 files changed

+21
-302
lines changed

DESCRIPTION

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ Collate:
5454
'crate.R'
5555
'cross_join.R'
5656
'dictionary_sugar.R'
57-
'dictionary_sugar_safe.R'
5857
'did_you_mean.R'
5958
'distinct_values.R'
6059
'encapsulate.R'

NAMESPACE

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,9 @@ export(deframe)
6969
export(detect)
7070
export(dictionary_sugar)
7171
export(dictionary_sugar_get)
72-
export(dictionary_sugar_get_safe)
7372
export(dictionary_sugar_inc_get)
74-
export(dictionary_sugar_inc_get_safe)
7573
export(dictionary_sugar_inc_mget)
76-
export(dictionary_sugar_inc_mget_safe)
7774
export(dictionary_sugar_mget)
78-
export(dictionary_sugar_mget_safe)
7975
export(did_you_mean)
8076
export(discard)
8177
export(distinct_values)

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# mlr3misc (development version)
22

33
* Bugfix: `crate()` is using the correct 'topenv' environment now.
4+
* Remove the unused 'safe' variants of dictionary getters
45

56
# mlr3misc 0.15.1
67

R/dictionary_sugar.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ dictionary_sugar_get = function(dict, .key, ...) {
7575
nn = ndots[[i]]
7676
if (!exists(nn, envir = instance, inherits = FALSE)) {
7777
stopf("Cannot set argument '%s' for '%s' (not a constructor argument, not a parameter, not a field.%s",
78-
nn, class(instance)[1L], did_you_mean(nn, c(constructor_args, param_ids, fields(obj$value))))
78+
nn, class(instance)[1L], did_you_mean(nn, c(constructor_args, param_ids, setdiff(names(instance), ".__enclos_env__")))) # nolint
7979
}
8080
instance[[nn]] = dots[[i]]
8181
}

R/dictionary_sugar_safe.R

Lines changed: 0 additions & 171 deletions
This file was deleted.

man/dictionary_sugar_get_safe.Rd

Lines changed: 0 additions & 55 deletions
This file was deleted.

man/dictionary_sugar_inc_get_safe.Rd

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)