Skip to content

Commit

Permalink
[python] add type hints on sklearn metric and eval wrappers (#5238)
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb authored May 25, 2022
1 parent 1a3afd2 commit 23da5fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python-package/lightgbm/sklearn.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 23da5fc

Please sign in to comment.