rapidsai/cudf

[FEA] Lint all Python docstrings using ruff's pydocstyle rules

Open

#10.711 aberto em 21 de abr. de 2022

Ver no GitHub
 (11 comments) (0 reactions) (1 assignee)C++ (735 forks)batch import
0 - BacklogPythondocfeature requestgood first issueimprovement

Métricas do repositório

Stars
 (6.000 stars)
Métricas de merge de PR
 (Mesclagem média 17d 21h) (230 fundiu PRs em 30d)

Description

Is your feature request related to a problem? Please describe. Our Python docstrings have various style violations when compared against standards like pep257. Not only does this impact readability (which may be subjective), it also reduces the effectiveness of tools like Sphinx or numpydoc that rely on specific formatting in order to parse docstrings.

Describe the solution you'd like We should lint all of our docstrings using pydocstyle, the standard for docstring linting in the Python ecosystem. I added support for pydocstyle in #7985 and have since added support for a few additional modules, but many of our most prominent public-facing APIs are not yet linted. My reticence to lint those files has stemmed in large part from the degree to which these files have been refactored recently and the number of docstrings that were rendered obsolete in the process. However, that process is largely complete now, at least for the most important public APIs, so I think we are at a good stage to start working through the remaining changes systematically.

While we have added pydocstyle on a per-file basis up to now, not all of pydocstyle's rules make sense for us since matching pandas is a higher priority. As a result, going forward we will enable rules on a per-rule rather than per-file basis so that we can get the most value out of pydocstyle without conflicting with preexisting pandas conventions. For more extensive discussion of different rules and why we choose to enable some or not, see the excellent table compiled by @bdice a few comments below..

Guia do colaborador