Description
As discovered in the process of working on #26301, there are invalid docstrings that should throw either GL06 - Found unknown section
or GL07 - Sections are in the wrong order
errors.
Without too much investigation, it's not clear why GL06
is not being thrown. Currently unsure if this is even a problem because, as @datapythonista mentioned in comments on #26301, we may not even run these checks on the private methods.
The missing GL07
are because section headers were only considered section headers if the following line had an equal number of -----
's (underlines).
This code is found here (where content[0]
is the section header):
pandas/scripts/validate_docstrings.py
Lines 383 to 386 in 2bbc0c2
- Reorder sections that are failing DOC Fix inconsistencies #26301 and merge
-
Fix GL07 to correctly throw errors with invalid underlines -
Investigate GL06 - Add error for valid section title words with invalid number of underlines
If it's okay with others, I'd like to take a crack at this issue.