Skip to content

Commit

Permalink
Fixing linting warnings identified by GitHub Action
Browse files Browse the repository at this point in the history
  • Loading branch information
tefirman committed Sep 12, 2024
1 parent 153ec51 commit 5175edb
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 3 additions & 1 deletion R/auth.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
}()
}
5 changes: 2 additions & 3 deletions R/info.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
#' - `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) |>
req_error(body = error_body) |>
req_perform() |>
resp_body_json()
}

2 changes: 1 addition & 1 deletion tests/testthat/helper-stubs.R
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-proof_cancel.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ test_that("proof_cancel - success", {
status = 200L,
headers = list("Content-type" = "application/json")
)
# stub_registry()

enable(quiet = TRUE)

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-proof_header.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")
})
})

0 comments on commit 5175edb

Please sign in to comment.