Fix some lints - #1171
Merged
Merged
Fix some lints#1171
Conversation
Owner
|
Thanks @etiennebacher. The new tool looks great. Yes, this is definitely a bug. Good catch. Unfortunately, it also looks like model <- glm(mpg ~ hp, data = mtcars)
# same behavior
sup <- c("glm", "lm")
isTRUE(all(sup %in% class(model)))
> [1] TRUE
isTRUE(all(inherits(model, sup)))
> [1] TRUE
# different behavior
sup <- c("glm", "junk")
isTRUE(all(sup %in% class(model)))
> [1] FALSE
isTRUE(all(inherits(model, sup)))
> [1] TRUE |
Contributor
Author
|
Thanks, nice catch, I reverted the change here and added a fix in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi @vincentarelbundock, I've made a new package to find lints and automatically fix them (
flint). I usedmarginaleffectsas one of my test cases and found a few lints so I thought you might want to remove them. In particular, I think it might have fixed a bug inR/methods_nnet.R.FYI those fixes were automatically generated with
flint::fix_dir("R", exclude_linters = "equal_assignment"). End of the self-advertising :)