Skip to content

CI: Add --ignore-deprecated to validate_docstrings.py #23631

Closed
@datapythonista

Description

@datapythonista

The script scripts/validate_docstrings.py returns the list of errors in the docstrings. We are using it to get the list of things to fix, and to check in the CI that no more mistakes are added, after the errors are fixed. See for example #23630.

As we don't really want to spend time fixing the docstrings that will be removed soon, it would be useful to add an argument to the script --ignore-deprecated that skips the functions/methods that are marked as deprecated (see Docstring.deprecated).

Things to note:

  • When deprecated docstrings are skipped, they should not be displayed in the output of the script, and also not counted in the exit status of the script (so, the script should finish with exit status 0 if --ignore-deprecated is set and only deprecated functions are wrong).
  • We should add at least one test to make sure the new argument works as expected.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions