diff --git a/python-package/lightgbm/dask.py b/python-package/lightgbm/dask.py index 26e8f62fe30f..2a6cd45f0e8b 100644 --- a/python-package/lightgbm/dask.py +++ b/python-package/lightgbm/dask.py @@ -1161,7 +1161,7 @@ def __init__( def __getstate__(self) -> Dict[Any, Any]: return self._lgb_dask_getstate() - def fit( + def fit( # type: ignore[override] self, X: _DaskMatrixLike, y: _DaskCollection, @@ -1349,7 +1349,7 @@ def __init__( def __getstate__(self) -> Dict[Any, Any]: return self._lgb_dask_getstate() - def fit( + def fit( # type: ignore[override] self, X: _DaskMatrixLike, y: _DaskCollection, @@ -1518,7 +1518,7 @@ def __init__( def __getstate__(self) -> Dict[Any, Any]: return self._lgb_dask_getstate() - def fit( + def fit( # type: ignore[override] self, X: _DaskMatrixLike, y: _DaskCollection, diff --git a/python-package/lightgbm/sklearn.py b/python-package/lightgbm/sklearn.py index 87a4c1f8e81b..61790627381a 100644 --- a/python-package/lightgbm/sklearn.py +++ b/python-package/lightgbm/sklearn.py @@ -984,7 +984,7 @@ def feature_name_(self): class LGBMRegressor(_LGBMRegressorBase, LGBMModel): """LightGBM regressor.""" - def fit( + def fit( # type: ignore[override] self, X, y, @@ -1030,7 +1030,7 @@ def fit( class LGBMClassifier(_LGBMClassifierBase, LGBMModel): """LightGBM classifier.""" - def fit( + def fit( # type: ignore[override] self, X, y, @@ -1191,7 +1191,7 @@ class LGBMRanker(LGBMModel): Please use this class mainly for training and applying ranking models in common sklearnish way. """ - def fit( + def fit( # type: ignore[override] self, X, y,