Unverified Commit ed0a7f2c authored by IdoKendo's avatar IdoKendo Committed by GitHub
Browse files

[python-package] Fix mypy errors for fit() incompatible signature (#5679)

parent 9954bc42
......@@ -1161,7 +1161,7 @@ class DaskLGBMClassifier(LGBMClassifier, _DaskLGBMModel):
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 @@ class DaskLGBMRegressor(LGBMRegressor, _DaskLGBMModel):
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 @@ class DaskLGBMRanker(LGBMRanker, _DaskLGBMModel):
def __getstate__(self) -> Dict[Any, Any]:
return self._lgb_dask_getstate()
def fit(
def fit( # type: ignore[override]
self,
X: _DaskMatrixLike,
y: _DaskCollection,
......
......@@ -984,7 +984,7 @@ class LGBMModel(_LGBMModelBase):
class LGBMRegressor(_LGBMRegressorBase, LGBMModel):
"""LightGBM regressor."""
def fit(
def fit( # type: ignore[override]
self,
X,
y,
......@@ -1030,7 +1030,7 @@ class LGBMRegressor(_LGBMRegressorBase, LGBMModel):
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,
......
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