ENH: add GL11 validation for bullet list formatting in docstrings#693
Open
Sidra-009 wants to merge 4 commits into
Open
ENH: add GL11 validation for bullet list formatting in docstrings#693Sidra-009 wants to merge 4 commits into
Sidra-009 wants to merge 4 commits into
Conversation
larsoner
requested changes
Jun 1, 2026
Collaborator
larsoner
left a comment
There was a problem hiding this comment.
Can you update a test that would fail on main but pass on this PR?
I think it would show that this is not working yet, as I tried it on a repo and got:
____________________________________________________________________________ test_docstring_parameters _____________________________________________________________________________
mne/tests/test_docstring_parameters.py:190: in test_docstring_parameters
incorrect += check_parameters_match(method, cls=cls, where=name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
mne/tests/test_docstring_parameters.py:131: in check_parameters_match
for err in validate(name)["errors"]
^^^^^^^^^^^^^^
../numpydoc/numpydoc/validate.py:755: in validate
errs.append(error("GL11"))
^^^^^^^^^^^^^
../numpydoc/numpydoc/validate.py:219: in error
return code, ERROR_MSGS[code].format(**kwargs)
^^^^^^^^^^^^^^^^
E KeyError: 'GL11'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this PR introduces GL11 validation to detect missing blank lines before bullet lists in docstrings
this prevents a known Sphinx Napoleon rendering issue where bullet lists are incorrectly merged into paragraphs when not separated by a blank line after a colon.
the check triggers when:
this improves docstring rendering consistency and documentation quality