DOC: Improve error message when the docstring sections are in the wrong order #23644
Labels
CI
Continuous Integration
Docs
Error Reporting
Incorrect or improved errors from pandas
good first issue
Milestone
When checking for errors with
scripts/validate_docstrings.py
, one of the checks is to make sure that the sections are in the right order. But so far we didn't find a great way to report the error, so the user quickly knows what needs to be changed (see discussion in #23607 (comment)).For example, if the sections in the docstring are:
The reported error is:
A better option is probably to simply return the sections in the docstring in the right order:
CC: @TomAugspurger
The text was updated successfully, but these errors were encountered: