"src/liger_kernel/transformers/jsd.py" did not exist on "fe5cd1fcc6d5ddf0e39a41a33223cf3377548c7f"
Unverified Commit 2a5e33b7 authored by Oliver Borchert's avatar Oliver Borchert Committed by GitHub
Browse files

[python-package] Fix mypy checks in `compat.py` (#6898)


Co-authored-by: default avatarJames Lamb <jaylamb20@gmail.com>
parent c73a21b3
......@@ -36,16 +36,16 @@ try:
# validate_data() was added in scikit-learn 1.6, this function roughly imitates it for older versions.
# It can be removed when lightgbm's minimum scikit-learn version is at least 1.6.
def validate_data(
_estimator,
X,
y="no_validation",
_estimator: Any,
X: Any,
y: Any = "no_validation",
accept_sparse: bool = True,
# 'force_all_finite' was renamed to 'ensure_all_finite' in scikit-learn 1.6
ensure_all_finite: bool = False,
ensure_min_samples: int = 1,
# trap other keyword arguments that only work on scikit-learn >=1.6, like 'reset'
**ignored_kwargs,
):
**ignored_kwargs: Any,
) -> Any:
# it's safe to import _num_features unconditionally because:
#
# * it was first added in scikit-learn 0.24.2
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment