From 23da5fc56abceac9ccb8ca2b09f945684e0f769e Mon Sep 17 00:00:00 2001 From: James Lamb Date: Wed, 25 May 2022 13:13:56 -0500 Subject: [PATCH] [python] add type hints on sklearn metric and eval wrappers (#5238) --- python-package/lightgbm/sklearn.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python-package/lightgbm/sklearn.py b/python-package/lightgbm/sklearn.py index a1301f98323f..b5515ee63855 100644 --- a/python-package/lightgbm/sklearn.py +++ b/python-package/lightgbm/sklearn.py @@ -83,7 +83,7 @@ def __init__(self, func: _LGBM_ScikitCustomObjectiveFunction): """ self.func = func - def __call__(self, preds, dataset): + def __call__(self, preds: np.ndarray, dataset: Dataset) -> Tuple[np.ndarray, np.ndarray]: """Call passed function with appropriate arguments. Parameters @@ -165,7 +165,7 @@ def __init__(self, func: _LGBM_ScikitCustomEvalFunction): """ self.func = func - def __call__(self, preds, dataset): + def __call__(self, preds: np.ndarray, dataset: Dataset) -> Tuple[str, float, bool]: """Call passed function with appropriate arguments. Parameters