Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove extra argument to new_pillar() #497

Merged
merged 3 commits into from
Feb 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -160,6 +160,9 @@ importFrom(fansi,strip_sgr)
importFrom(fansi,substr2_ctl)
importFrom(glue,as_glue)
importFrom(lifecycle,deprecate_soft)
importFrom(lifecycle,deprecate_warn)
importFrom(lifecycle,deprecated)
importFrom(lifecycle,is_present)
importFrom(utf8,utf8_width)
importFrom(utils,head)
importFrom(utils,str)
13 changes: 8 additions & 5 deletions R/ctl_pillar.R
Original file line number Diff line number Diff line change
@@ -142,8 +142,7 @@ rowidformat2 <- function(data, names, has_star) {
#' @inheritParams pillar
#' @param components A named list of components constructed with [pillar_component()].
#' @param class Name of subclass.
#' @param extra For compound pillars, indicate the names or indices of the
#' sub-pillars that could not be shown due to width constraints.
#' @param extra Deprecated.
#'
#' @export
#' @examples
@@ -161,9 +160,14 @@ rowidformat2 <- function(data, names, has_star) {
#' lines = new_pillar_component(list(lines("=")), width = 1)
#' ))
new_pillar <- function(components, ..., width = NULL, class = NULL,
extra = NULL) {
extra = deprecated()) {
"!!!!DEBUG new_pillar(`v(width)`, `v(class)`)"

if (is_present(extra)) {
# Signal the deprecation to the user
deprecate_warn("1.6.6", "pillar::new_pillar(extra = )")
}

check_dots_empty()
if (length(components) > 0 && !is_named(components)) {
abort("All components must have names.")
@@ -172,8 +176,7 @@ new_pillar <- function(components, ..., width = NULL, class = NULL,
structure(
components,
width = width,
class = c(class, "pillar"),
extra = extra
class = c(class, "pillar")
)
}

2 changes: 1 addition & 1 deletion R/zzz.R
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
#' @import rlang
#' @import ellipsis
#' @importFrom glue as_glue
#' @importFrom lifecycle deprecate_soft
#' @importFrom lifecycle deprecate_soft deprecate_warn is_present deprecated
#' @importFrom vctrs data_frame
#' @importFrom vctrs new_data_frame
#' @importFrom vctrs new_list_of
5 changes: 2 additions & 3 deletions man/new_pillar.Rd

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