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

[R-package] remove unused '...' in Booster constructor #4523

Merged
merged 2 commits into from
Aug 18, 2021

Conversation

jameslamb
Copy link
Collaborator

Contributes to #4310 (based on #4226 (comment)).

This proposes removing the ... from the constructor of the Booster class in the R package. That class is not exported from the R package, so its constructor can be considered a private API and this change should be considered non-breaking (similar to #4338).

Removing this use of ... makes the package's code slightly stricter, which reduces the risk of bugs.

Notes for Reviewers

Internal calls of the Booster class always use that class's existing keyword arguments.

return(invisible(Booster$new(modelfile = filename)))

return(invisible(Booster$new(model_str = model_str)))

booster <- Booster$new(params = params, train_set = data)

booster <- Booster$new(params = params, train_set = dtrain)

Found with git grep -E 'Booster\$new'.

Copy link
Collaborator

@StrikerRUS StrikerRUS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jameslamb jameslamb mentioned this pull request Aug 15, 2021
21 tasks
@jameslamb jameslamb merged commit a7ff117 into master Aug 18, 2021
@jameslamb jameslamb deleted the fix/booster-ellipses branch August 18, 2021 00:55
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants