Skip to content

Commit c335f52

Browse files
committed
fix: remove extra arguments for names, not supported
1 parent e1a69b3 commit c335f52

File tree

2 files changed

+5
-22
lines changed

2 files changed

+5
-22
lines changed

R/qenv-names.R

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,9 @@
44
#' The names are extrapolated from the objects in the `qenv` environment and
55
#' are not stored statically, unlike the normal behavior of `names()` function.
66
#'
7-
#' Objects named with a `.` (dot) prefix will be ignored and not returned,
8-
#' unless `all.names` parameter is set to `TRUE`.
7+
#' Objects named with a `.` (dot) prefix will be ignored and not returned.
98
#'
109
#' @param x (`qenv` or `qenv_error`) object.
11-
#' @param ... Additional parameters to this function, allowed parameters:
12-
#'
13-
#' - `all.names`: (`logical(1)`) that specifies whether to include hidden objects.
14-
#'
1510
#' @return A character vector of names.
1611
#'
1712
#' @seealso [base::names()]
@@ -27,14 +22,8 @@
2722
#' names(q2)
2823
#'
2924
#' @export
30-
names.qenv <- function(x, ...) {
31-
dots <- rlang::list2(...)
32-
if (length(setdiff(names(dots), "all.names")) > 0) {
33-
stop("Only `x` and 'all.names' parameter are allowed")
34-
}
35-
checkmate::assert_flag(dots[["all.names"]], .var.name = "all.names", null.ok = TRUE)
36-
if (is.null(dots[["all.names"]])) dots[["all.names"]] <- FALSE
37-
ls(get_env(x), all.names = dots[["all.names"]])
25+
names.qenv <- function(x) {
26+
ls(get_env(x))
3827
}
3928

4029
#' @rdname names.qenv

man/names.qenv.Rd

Lines changed: 2 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)