Skip to content

Commit

Permalink
docs: more consistent type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
m-muecke committed Dec 4, 2024
1 parent 051f091 commit 06035c7
Show file tree
Hide file tree
Showing 21 changed files with 32 additions and 32 deletions.
4 changes: 2 additions & 2 deletions R/Callback.R
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ Callback = R6Class("Callback",
#' @description
#' Convert object to a [Callback] or a list of [Callback].
#'
#' @param x (any)\cr
#' @param x (`any`)\cr
#' Object to convert.
#' @param ... (any)\cr
#' @param ... (`any`)\cr
#' Additional arguments.
#'
#' @return [Callback].
Expand Down
2 changes: 1 addition & 1 deletion R/assert_ro_binding.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#' [R6::R6Class] which does not allow assignment.
#' If `rhs` is not missing, an exception is raised.
#'
#' @param rhs (any)\cr
#' @param rhs (`any`)\cr
#' If not missing, an exception is raised.
#'
#' @return Nothing.
Expand Down
4 changes: 2 additions & 2 deletions R/calculate_hash.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' columns of a specific class.
#' Objects that don't have a specific method are hashed as is.
#'
#' @param ... (any)\cr
#' @param ... (`any`)\cr
#' Objects to hash.
#'
#' @return (`character(1)`).
Expand All @@ -22,7 +22,7 @@ calculate_hash = function(...) {
#'
#' Returns the part of an object to be used to calculate its hash.
#'
#' @param x (any)\cr
#' @param x (`any`)\cr
#' Object for which to retrieve the hash input.
#' @export
hash_input = function(x) {
Expand Down
2 changes: 1 addition & 1 deletion R/crate.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#'
#' @param .fn (`function()`)\cr
#' function to crate
#' @param ... (any)\cr
#' @param ... (`any`)\cr
#' The objects, which should be visible inside `.fn`.
#' @param .parent (`environment`)\cr
#' Parent environment to look up names. Default to [topenv()].
Expand Down
6 changes: 3 additions & 3 deletions R/dictionary_sugar.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#' Keys of the objects to construct.
#' @param ... (`any`)\cr
#' See description.
#' @param .dicts_suggest (named [`list`])
#' @param .dicts_suggest (named `list()`)
#' Named list of [dictionaries][Dictionary] used to look up suggestions for `.key` if `.key` does not exist in `dict`.
#'
#' @return [R6::R6Class()]
Expand Down Expand Up @@ -149,9 +149,9 @@ fields = function(x) {
#' Key of the object to construct - possibly with a suffix of the form `_<n>` which will be appended to the id.
#' @param .keys (`character()`)\cr
#' Keys of the objects to construct - possibly with suffixes of the form `_<n>` which will be appended to the ids.
#' @param ... (any)\cr
#' @param ... (`any`)\cr
#' See description of [mlr3misc::dictionary_sugar].
#' @param .dicts_suggest (named [`list`])
#' @param .dicts_suggest (named `list()`)
#' Named list of [dictionaries][Dictionary] used to look up suggestions for `.key` if `.key` does not exist in `dict`.
#'
#' @return An element from the dictionary.
Expand Down
2 changes: 1 addition & 1 deletion R/did_you_mean.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ did_you_mean = function(str, candidates) {
#
# @param key (`character(1)`) \cr
# Key to look for in `dicts`.
# @param dicts (named list)\cr
# @param dicts (named `list()`)\cr
# Named list of [dictionaries][Dictionary].
# @param max_candidates_dicts (`integer(1)`) \cr
# Maximum number of dictionaries for which suggestions are outputted.
Expand Down
6 changes: 3 additions & 3 deletions R/get_private.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#' @description
#' Provides access to the private members of [R6::R6Class] objects.
#'
#' @param x (any)\cr
#' @param x (`any`)\cr
#' Object to extract the private members from.
#'
#' @return `environment()` of private members, or `NULL` if `x` is not an R6 object.
Expand All @@ -25,11 +25,11 @@ get_private = function(x) {
#' @description
#' Convenience function to assign a value to a private field of an [R6::R6Class] instance.
#'
#' @param x (any)\cr
#' @param x (`any`)\cr
#' Object whose private field should be modified.
#' @param which (character(1))\cr
#' Private field that is being modified.
#' @param value (any)\cr
#' @param value (`any`)\cr
#' Value to assign to the private field.
#'
#' @return The R6 instance x, modified in-place. If it is not an R6 instance, NULL is returned.
Expand Down
2 changes: 1 addition & 1 deletion R/set_class.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' @param classes (`character(1)`)\cr
#' Vector of new class names.
#'
#' @return Object \code{x}, with updated class attribute.
#' @return Object `x`, with updated class attribute.
#' @export
#' @examples
#' set_class(list(), c("foo1", "foo2"))
Expand Down
2 changes: 1 addition & 1 deletion R/set_params.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#'
#' @param .ps ([paradox::ParamSet])\cr
#' The parameter set whose values are changed.
#' @param ... (any)
#' @param ... (`any`)
#' Named parameter values.
#' @param .values (`list()`)
#' Named list with parameter values.
Expand Down
4 changes: 2 additions & 2 deletions R/strip_srcrefs.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#' from objects.
#' Methods should remove source references from the input, but should otherwise leave the input unchanged.
#'
#' @param x (any)\cr
#' @param x (`any`)\cr
#' The object to strip of source references.
#' @param ... (any)\cr
#' @param ... (`any`)\cr
#' Additional arguments to the method.
#'
#' @keywords internal
Expand Down
4 changes: 2 additions & 2 deletions man/as_callback.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/assert_ro_binding.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/calculate_hash.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/crate.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/dictionary_sugar_get.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/dictionary_sugar_inc_get.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/get_private-set.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/get_private.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/hash_input.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/set_params.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/strip_srcrefs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 06035c7

Please sign in to comment.