Skip to content

Commit 5c4ab04

Browse files
authored
docs: more consistent type annotations (#126)
1 parent 051f091 commit 5c4ab04

21 files changed

+32
-32
lines changed

R/Callback.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ Callback = R6Class("Callback",
111111
#' @description
112112
#' Convert object to a [Callback] or a list of [Callback].
113113
#'
114-
#' @param x (any)\cr
114+
#' @param x (`any`)\cr
115115
#' Object to convert.
116-
#' @param ... (any)\cr
116+
#' @param ... (`any`)\cr
117117
#' Additional arguments.
118118
#'
119119
#' @return [Callback].

R/assert_ro_binding.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#' [R6::R6Class] which does not allow assignment.
66
#' If `rhs` is not missing, an exception is raised.
77
#'
8-
#' @param rhs (any)\cr
8+
#' @param rhs (`any`)\cr
99
#' If not missing, an exception is raised.
1010
#'
1111
#' @return Nothing.

R/calculate_hash.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#' columns of a specific class.
88
#' Objects that don't have a specific method are hashed as is.
99
#'
10-
#' @param ... (any)\cr
10+
#' @param ... (`any`)\cr
1111
#' Objects to hash.
1212
#'
1313
#' @return (`character(1)`).
@@ -22,7 +22,7 @@ calculate_hash = function(...) {
2222
#'
2323
#' Returns the part of an object to be used to calculate its hash.
2424
#'
25-
#' @param x (any)\cr
25+
#' @param x (`any`)\cr
2626
#' Object for which to retrieve the hash input.
2727
#' @export
2828
hash_input = function(x) {

R/crate.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#'
66
#' @param .fn (`function()`)\cr
77
#' function to crate
8-
#' @param ... (any)\cr
8+
#' @param ... (`any`)\cr
99
#' The objects, which should be visible inside `.fn`.
1010
#' @param .parent (`environment`)\cr
1111
#' Parent environment to look up names. Default to [topenv()].

R/dictionary_sugar.R

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#' Keys of the objects to construct.
2525
#' @param ... (`any`)\cr
2626
#' See description.
27-
#' @param .dicts_suggest (named [`list`])
27+
#' @param .dicts_suggest (named `list()`)
2828
#' Named list of [dictionaries][Dictionary] used to look up suggestions for `.key` if `.key` does not exist in `dict`.
2929
#'
3030
#' @return [R6::R6Class()]
@@ -149,9 +149,9 @@ fields = function(x) {
149149
#' Key of the object to construct - possibly with a suffix of the form `_<n>` which will be appended to the id.
150150
#' @param .keys (`character()`)\cr
151151
#' Keys of the objects to construct - possibly with suffixes of the form `_<n>` which will be appended to the ids.
152-
#' @param ... (any)\cr
152+
#' @param ... (`any`)\cr
153153
#' See description of [mlr3misc::dictionary_sugar].
154-
#' @param .dicts_suggest (named [`list`])
154+
#' @param .dicts_suggest (named `list()`)
155155
#' Named list of [dictionaries][Dictionary] used to look up suggestions for `.key` if `.key` does not exist in `dict`.
156156
#'
157157
#' @return An element from the dictionary.

R/did_you_mean.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ did_you_mean = function(str, candidates) {
2828
#
2929
# @param key (`character(1)`) \cr
3030
# Key to look for in `dicts`.
31-
# @param dicts (named list)\cr
31+
# @param dicts (named `list()`)\cr
3232
# Named list of [dictionaries][Dictionary].
3333
# @param max_candidates_dicts (`integer(1)`) \cr
3434
# Maximum number of dictionaries for which suggestions are outputted.

R/get_private.R

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#' @description
44
#' Provides access to the private members of [R6::R6Class] objects.
55
#'
6-
#' @param x (any)\cr
6+
#' @param x (`any`)\cr
77
#' Object to extract the private members from.
88
#'
99
#' @return `environment()` of private members, or `NULL` if `x` is not an R6 object.
@@ -25,11 +25,11 @@ get_private = function(x) {
2525
#' @description
2626
#' Convenience function to assign a value to a private field of an [R6::R6Class] instance.
2727
#'
28-
#' @param x (any)\cr
28+
#' @param x (`any`)\cr
2929
#' Object whose private field should be modified.
3030
#' @param which (character(1))\cr
3131
#' Private field that is being modified.
32-
#' @param value (any)\cr
32+
#' @param value (`any`)\cr
3333
#' Value to assign to the private field.
3434
#'
3535
#' @return The R6 instance x, modified in-place. If it is not an R6 instance, NULL is returned.

R/set_class.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#' @param classes (`character(1)`)\cr
88
#' Vector of new class names.
99
#'
10-
#' @return Object \code{x}, with updated class attribute.
10+
#' @return Object `x`, with updated class attribute.
1111
#' @export
1212
#' @examples
1313
#' set_class(list(), c("foo1", "foo2"))

R/set_params.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#'
55
#' @param .ps ([paradox::ParamSet])\cr
66
#' The parameter set whose values are changed.
7-
#' @param ... (any)
7+
#' @param ... (`any`)
88
#' Named parameter values.
99
#' @param .values (`list()`)
1010
#' Named list with parameter values.

R/strip_srcrefs.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
#' from objects.
77
#' Methods should remove source references from the input, but should otherwise leave the input unchanged.
88
#'
9-
#' @param x (any)\cr
9+
#' @param x (`any`)\cr
1010
#' The object to strip of source references.
11-
#' @param ... (any)\cr
11+
#' @param ... (`any`)\cr
1212
#' Additional arguments to the method.
1313
#'
1414
#' @keywords internal

man/as_callback.Rd

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/assert_ro_binding.Rd

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/calculate_hash.Rd

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/crate.Rd

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/dictionary_sugar_get.Rd

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/dictionary_sugar_inc_get.Rd

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/get_private-set.Rd

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/get_private.Rd

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/hash_input.Rd

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/set_params.Rd

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/strip_srcrefs.Rd

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)