Description
scripts/validate_docstrings.py
validates that the content of a docstring follows our standards. There are still some of those standards that the script does not validate, and this gives the users the wrong impression that the docstring is all right, when it's not really the case. All the missing validations are listed in #20298.
The format of the Returns
section consists of a first line with just the type, and afterwards indented the description. In the case a tuple is returned, then the format is name : type or types
for each parameter, and indented descriptions after them. The descriptions need to start with a capital letter and finish with a period. See: https://pandas.pydata.org/pandas-docs/stable/contributing_docstring.html#section-4-returns-or-yields
For this issue is required:
- Change
scripts/validate_docstings.py
to give errors if some of the described formats are not satisfied. - Add tests in
scripts/tests/test_validate_docstrings.py