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

Replace is.logical by isTRUE in the code #809

Closed
nikosbosse opened this issue May 5, 2024 · 0 comments · Fixed by #815
Closed

Replace is.logical by isTRUE in the code #809

nikosbosse opened this issue May 5, 2024 · 0 comments · Fixed by #815

Comments

@nikosbosse
Copy link
Contributor

We are often checking whether the output of a check_ function is a logical. Instead, it would be cleaner to check if the value is TRUE directly.

From the code review:

This seems a bit fragile since we wouldn't want FALSE (even though it's not supposed to pop up) to return TRUE.

test_columns_present <- function(data, columns) {
  check <- check_columns_present(data, columns)
  return(isTRUE(check))
}

Originally posted by @Bisaloo in #791 (comment)

@nikosbosse nikosbosse added this to the scoringutils-2.x milestone May 5, 2024
nikosbosse added a commit that referenced this issue May 19, 2024
Issue #809 - Replace is.logical by isTRUE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant