From 12f10e2c9547b801cf6b3cac030918ea73e6db76 Mon Sep 17 00:00:00 2001 From: Carl Suster Date: Wed, 9 Oct 2024 15:31:37 +1100 Subject: [PATCH] Fix lint failures --- R/configure_inset.R | 18 +++++++++--------- R/inset_shape_rectangle.R | 2 -- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/R/configure_inset.R b/R/configure_inset.R index 39224cb..6964245 100644 --- a/R/configure_inset.R +++ b/R/configure_inset.R @@ -59,14 +59,14 @@ #' radius = 50, #' units = "mi") configure_inset <- function( - centre, - scale = NULL, - translation = NULL, - radius = NULL, - hwidth = NULL, - hheight = NULL, - units = "km", - crs_working = NULL + centre, + scale = NULL, + translation = NULL, + radius = NULL, + hwidth = NULL, + hheight = NULL, + units = "km", + crs_working = NULL ) { crs_input <- sf::NA_crs_ if (inherits(centre, "sfc")) { @@ -173,7 +173,7 @@ check_inset_config <- function(inset) { if (is.null(inset)) cli::cli_abort("Inset configuration must be provided") if (!is.null(inset[["radius"]]) && !is.null(inset[["hwidth"]])) { - cli::cli_abort("Only one of inset {.arg radius} or {.arg hwidth} can be specified") + cli::cli_abort("Only one of inset {.arg radius} or {.arg hwidth} can be specified") } if (!is.null(inset[["radius"]])) { if (inset$radius <= 0) { diff --git a/R/inset_shape_rectangle.R b/R/inset_shape_rectangle.R index b7d7a6c..d851bc6 100644 --- a/R/inset_shape_rectangle.R +++ b/R/inset_shape_rectangle.R @@ -26,8 +26,6 @@ make_frame.inset_shape_rectangle <- function(inset) { if (is.null(trans)) trans <- c(0, 0) scale <- inset_scale(inset) if (is.null(scale)) scale <- 1 - width <- inset_width(inset) - height <- inset_width(inset) viewport <- inset_viewport(inset) result <- viewport