Skip to content

Commit

Permalink
[docs][python] fix LGBMRanker docstring (#4306)
Browse files Browse the repository at this point in the history
  • Loading branch information
StrikerRUS authored May 21, 2021
1 parent f076ca5 commit 41a1a24
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions python-package/lightgbm/sklearn.py
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,6 @@ def fit(self, X, y,
+ _base_doc[_base_doc.find('eval_init_score :'):]) # type: ignore
_base_doc = fit.__doc__
_before_early_stop, _early_stop, _after_early_stop = _base_doc.partition('early_stopping_rounds :')
fit.__doc__ = (f"{_before_early_stop}"
"eval_at : iterable of int, optional (default=(1, 2, 3, 4, 5))\n"
f"{' ':12}The evaluation positions of the specified metric.\n"
f"{' ':8}{_early_stop}{_after_early_stop}")
fit.__doc__ = f"""{_before_early_stop}eval_at : iterable of int, optional (default=(1, 2, 3, 4, 5))
The evaluation positions of the specified metric.
{_early_stop}{_after_early_stop}"""

0 comments on commit 41a1a24

Please sign in to comment.