Skip to content

Commit

Permalink
Merge branch 'dev2'
Browse files Browse the repository at this point in the history
  • Loading branch information
jiajic committed Jul 12, 2024
2 parents 4de1e18 + 83abfd0 commit c5b8000
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
8 changes: 6 additions & 2 deletions R/lifecycle.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ lifecycle_badge <- function(stage = "stable") {
#' @param fun character. Name of function
#' @param when character. Version number in which the deprecation happened.
#' @param check character. Method to check if deprecated param was used
#' @param always If FALSE, the default, will warn every 8 hours. If TRUE, will
#' always warn in direct usages. Indirect usages keep warning every 8 hours to
#' avoid disrupting users who can't fix the issue. Only use always = TRUE
#' after at least one release with the default.
#' @returns final value to be used
#' @examples
#' foo <- function(dep = deprecated(), sup = 10) {
Expand Down Expand Up @@ -97,7 +101,7 @@ lifecycle_badge <- function(stage = "stable") {
#'
#' @export
deprecate_param <- function(
x, y, fun, when, check = c("deprecated", "null")
x, y, fun, when, check = c("deprecated", "null"), always = FALSE
) {
# checkmate::assert_character(from)
check <- match.arg(check, choices = c("deprecated", "null"))
Expand All @@ -117,7 +121,7 @@ deprecate_param <- function(
with = sprintf("%s(%s)", fun, ychar),
env = parent.frame(2),
user_env = parent.frame(3),
always = TRUE
always = always
)
return(x)
}
Expand Down
14 changes: 13 additions & 1 deletion man/deprecate_param.Rd

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

0 comments on commit c5b8000

Please sign in to comment.