[ci] [python-package] enforce 'numpydoc-validation' and 'pydoclint' checks #7478

Open
jameslamb opened 4:57pm on October 1, 2026 wants to merge 325 Ξ” into microsoft/lightgbm main from
ci/pydoclint

Pull Request Overview

  • Opened on October 1, 2026
  • Status Open
  • Commit count 7 with first commit September 29, 2026

Total Delta

325 Total Diff Delta

Open Days

Open 2 weekdays

Test Delta

54 Diff Delta in Test Files
Breakdown by Phase

How long has this pull request spent in each phase of its lifecycle?

Fraction of total time Business days Phase
 
1.8 days Authoring 5 commits before pull request opened for review
 
0.0 days Awaiting first review
 
1.2 days Revising work with 2 commits in response to 0 reviews that left 3 comments

Total time for pull request still awaiting merge: 3.0 business days

Author avatar

[ci] [python-package] enforce 'numpydoc-validation' and 'pydoclint' checks

Contributes to #7470

Proposes adding numpydoc-validation and pydoclint, 2 linters that enforce standardization and correctness of Python docstrings. These caught a few issues (like eval_{X,y} missing from the Dask docstrings.

Both are fast enough to not be noticeable.

I think they'll help a lot with consistency and standardization, and relieve a small bit of review burden.

Notes for Reviewers

I tried to choose configurations for these tools that as closely as possible match the project's current conventions. See inline comments below.

I've added this branch (temporarily) to readthedocs configuration.

Comments Threads Pending Resolution

python-package/lightgbm/dask.py
1395
        eval_init_score: Optional[List[_DaskCollection]] = None,
1396
        eval_metric: Optional[_LGBM_ScikitEvalMetricType] = None,
1397
        *,
1398
        categorical_feature: _LGBM_CategoricalFeatureConfiguration = "auto",
.ci/parameter-generator.py
98
    -------
99
    list
100
        Names of all parameters.
101 101
    """
  # noqa: DOC105

Resolved Comment Threads

.ci/parameter-generator.py
Outdated
23
24
    Returns
25
    -------
26
    tuple