Skip to content

DOC: Validation of docsting validates Python type doc #27055

Open
@datapythonista

Description

@datapythonista

Our script scripts/validate_docstrings.py validates that docstrings in our code follow certain standards (the right parameters are documented, the docstring contain examples, capitalization and punctuation...).

There is currently one case when the validation is incorrect. See this (hypothetical) example:

class Series:
    ndim = 1

If we execute ./scripts/validate_docstrings.py pandas.Series.ndim, we'd expect the script to detect that ndim doesn't have a docstring. But instead, the script is validating the docstring of the type int (the doc of the scalar 1).

This is happening in practice for offset, and is preventing us to validate some error types to the CI. See: #26982 (comment)

We should detect this case in the script, and not validate the docstrings of attributes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CIContinuous IntegrationDocs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions