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): ...@@ -1161,7 +1161,7 @@ class DaskLGBMClassifier(LGBMClassifier, _DaskLGBMModel):
def __getstate__(self) -> Dict[Any, Any]: def __getstate__(self) -> Dict[Any, Any]:
return self._lgb_dask_getstate() return self._lgb_dask_getstate()
def fit( def fit( # type: ignore[override]
self, self,
X: _DaskMatrixLike, X: _DaskMatrixLike,
y: _DaskCollection, y: _DaskCollection,
...@@ -1349,7 +1349,7 @@ class DaskLGBMRegressor(LGBMRegressor, _DaskLGBMModel): ...@@ -1349,7 +1349,7 @@ class DaskLGBMRegressor(LGBMRegressor, _DaskLGBMModel):
def __getstate__(self) -> Dict[Any, Any]: def __getstate__(self) -> Dict[Any, Any]:
return self._lgb_dask_getstate() return self._lgb_dask_getstate()
def fit( def fit( # type: ignore[override]
self, self,
X: _DaskMatrixLike, X: _DaskMatrixLike,
y: _DaskCollection, y: _DaskCollection,
...@@ -1518,7 +1518,7 @@ class DaskLGBMRanker(LGBMRanker, _DaskLGBMModel): ...@@ -1518,7 +1518,7 @@ class DaskLGBMRanker(LGBMRanker, _DaskLGBMModel):
def __getstate__(self) -> Dict[Any, Any]: def __getstate__(self) -> Dict[Any, Any]:
return self._lgb_dask_getstate() return self._lgb_dask_getstate()
def fit( def fit( # type: ignore[override]
self, self,
X: _DaskMatrixLike, X: _DaskMatrixLike,
y: _DaskCollection, y: _DaskCollection,
......
...@@ -984,7 +984,7 @@ class LGBMModel(_LGBMModelBase): ...@@ -984,7 +984,7 @@ class LGBMModel(_LGBMModelBase):
class LGBMRegressor(_LGBMRegressorBase, LGBMModel): class LGBMRegressor(_LGBMRegressorBase, LGBMModel):
"""LightGBM regressor.""" """LightGBM regressor."""
def fit( def fit( # type: ignore[override]
self, self,
X, X,
y, y,
...@@ -1030,7 +1030,7 @@ class LGBMRegressor(_LGBMRegressorBase, LGBMModel): ...@@ -1030,7 +1030,7 @@ class LGBMRegressor(_LGBMRegressorBase, LGBMModel):
class LGBMClassifier(_LGBMClassifierBase, LGBMModel): class LGBMClassifier(_LGBMClassifierBase, LGBMModel):
"""LightGBM classifier.""" """LightGBM classifier."""
def fit( def fit( # type: ignore[override]
self, self,
X, X,
y, y,
...@@ -1191,7 +1191,7 @@ class LGBMRanker(LGBMModel): ...@@ -1191,7 +1191,7 @@ class LGBMRanker(LGBMModel):
Please use this class mainly for training and applying ranking models in common sklearnish way. Please use this class mainly for training and applying ranking models in common sklearnish way.
""" """
def fit( def fit( # type: ignore[override]
self, self,
X, X,
y, 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