Closed nikosbosse closed 1 month ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 95.54%. Comparing base (
fbfbe56
) to head (e62a20a
).:exclamation: Current head e62a20a differs from pull request most recent head 7f26674
Please upload reports for the commit 7f26674 to get more accurate results.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I think historically we didn't enforce r 3.5 or something like that. Or I was stupid:D
On Sun, 19 May 2024, 15:04 James Azam, @.***> wrote:
@.**** commented on this pull request.
In R/check-input-helpers.R https://github.com/epiforecasts/scoringutils/pull/815#discussion_r1606028651 :
- return(is.logical(check))
- return(isTRUE(check))
Mmhhh interesting! Why was is.logical() use here? it returns TRUE for both TRUE and FALSE whereas isTRUE will only returns TRUE for a value of TRUE.
— Reply to this email directly, view it on GitHub https://github.com/epiforecasts/scoringutils/pull/815#pullrequestreview-2065075233, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJBYFLLMQFPSQP4I4AWLSQTZDCPOLAVCNFSM6AAAAABH6EUGM6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDANRVGA3TKMRTGM . You are receiving this because you authored the thread.Message ID: @.***>
I think historically we didn't enforce r 3.5 or something like that. Or I was stupid:D … On Sun, 19 May 2024, 15:04 James Azam, @.> wrote: @*.*** commented on this pull request. ------------------------------ In R/check-input-helpers.R <#815 (comment)> : > - return(is.logical(check)) + return(isTRUE(check)) Mmhhh interesting! Why was is.logical() use here? it returns TRUE for both TRUE and FALSE whereas isTRUE will only returns TRUE for a value of TRUE. — Reply to this email directly, view it on GitHub <#815 (review)>, or unsubscribe <github.com/notifications/unsubscribe-auth/AJBYFLLMQFPSQP4I4AWLSQTZDCPOLAVCNFSM6AAAAABH6EUGM6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDANRVGA3TKMRTGM> . You are receiving this because you authored the thread.Message ID: @.>
I think it is unlikely to have caused any bugs unless in edge cases that I can't imagine atm, since "check" is either a string or TRUE
. But the isTRUE() replace here is safer.
Lovely, thank you!
Description
This PR closes #809.
Doe what it says on the tin. Purpose is improving robustness and code clarity.
Checklist
lintr::lint_package()
to check for style issues introduced by my changes.