From 5175edb226634f699cc283dc1fa99c0b57474fa5 Mon Sep 17 00:00:00 2001 From: tefirman Date: Thu, 12 Sep 2024 00:28:28 -0700 Subject: [PATCH] Fixing linting warnings identified by GitHub Action --- R/auth.R | 4 +++- R/info.R | 5 ++--- tests/testthat/helper-stubs.R | 2 +- tests/testthat/test-proof_cancel.R | 1 - tests/testthat/test-proof_header.R | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/R/auth.R b/R/auth.R index a1414ab..0397321 100644 --- a/R/auth.R +++ b/R/auth.R @@ -44,5 +44,7 @@ proof_authenticate <- function(username, password) { req_timeout(proofr_env$timeout_sec) |> req_perform() |> resp_body_json() |> - {\(x) x$token}() + { + \(x) x$token + }() } diff --git a/R/info.R b/R/info.R index 6c8efc9..8075bae 100644 --- a/R/info.R +++ b/R/info.R @@ -5,8 +5,8 @@ #' - `branch` (character): git branch of API #' - `commit_sha` (character): SHA of the git commit of the API #' - `short_commit_sha` (character): the first eight characters of `commit_sha` -#' - `commit_message` (character): the commit message of the API's most recent commit -#' - `tag` (character): tag of most recent commit; if this does not contain a hyphen, it's a release version +#' - `commit_message` (character): the commit message of API's most recent commit +#' - `tag` (character): tag of most recent commit (or release version if no hyphen) proof_info <- function() { request(make_url("info")) |> req_timeout(proofr_env$timeout_sec) |> @@ -14,4 +14,3 @@ proof_info <- function() { req_perform() |> resp_body_json() } - diff --git a/tests/testthat/helper-stubs.R b/tests/testthat/helper-stubs.R index b73693f..b7ad9f9 100644 --- a/tests/testthat/helper-stubs.R +++ b/tests/testthat/helper-stubs.R @@ -58,7 +58,7 @@ response_authenticate_success <- list( token_creation_date = NULL ) -response_info_success <- list ( +response_info_success <- list( branch = "main", commit_sha = "c4b85200632c2f9bd5e8173179208c3b32c7db7a", short_commit_sha = "c4b85200", diff --git a/tests/testthat/test-proof_cancel.R b/tests/testthat/test-proof_cancel.R index 5cb78f0..b6f4d58 100644 --- a/tests/testthat/test-proof_cancel.R +++ b/tests/testthat/test-proof_cancel.R @@ -6,7 +6,6 @@ test_that("proof_cancel - success", { status = 200L, headers = list("Content-type" = "application/json") ) - # stub_registry() enable(quiet = TRUE) diff --git a/tests/testthat/test-proof_header.R b/tests/testthat/test-proof_header.R index bd0d08e..48de5d2 100644 --- a/tests/testthat/test-proof_header.R +++ b/tests/testthat/test-proof_header.R @@ -10,6 +10,6 @@ test_that("proof_header", { # If PROOF_TOKEN env var set, fxn can find it withr::with_envvar(c("PROOF_TOKEN" = "notarealtoken"), { expect_match(proof_header(request(""))$headers[[1]], - "notarealtoken") + "notarealtoken") }) })