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

[python-package] add a few type hints in LGBMModel.fit() #6470

Merged
merged 4 commits into from
Jun 5, 2024

Conversation

jameslamb
Copy link
Collaborator

Contributes to #3867
Contributes to #3756

Pulls a function re-defined on every call to LGBMModel.fit() up to the module level, and adds type hints, a docstring, and comments to make it easier to understand and to improve mypy's ability to catch bugs on codepaths that go through it.

Resolves this error from mypy:

python-package/lightgbm/sklearn.py:872: error: Function is missing a type annotation  [no-untyped-def]

@jameslamb jameslamb requested a review from borchero June 3, 2024 03:18
@jameslamb jameslamb merged commit 4401401 into master Jun 5, 2024
39 checks passed
@jameslamb jameslamb deleted the mypy/sklearn-get-metadata branch June 5, 2024 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants