You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Sentence-length comment and docstring readers miss four layouts #2838
Follow-up to the change extending sentence-length to comments and docstrings. Four layouts are read wrongly and were left past the local review edit budget.
An indented table or command list under a colon line in a non-Python comment is joined into prose, because comment extraction strips the indent before the reader sees it.
NumPy-style docstring sections (a name, a dashed underline, name : type lines) are joined into one sentence.
A docstring whose closing quotes sit on its last code line takes its indent base from the code, so the code is counted as prose.
Google-style Args: bodies are treated as code, so a long sentence under them is not checked.
Each needs a constructed failing input in tests/test_prose_lint.py and a fix in docstring_sentence_findings or comment_sentence_findings.
Also found: a bullet marker (a dash or asterisk) counts as a word in a comment or docstring, and a numbered marker counts in a docstring and in Markdown, so an item of exactly the cap reports one word over. The Markdown reader does the same today. A fix should strip list markers in one shared place.
Also found: adjacent-docstring splitting infers a boundary from quote characters, so a module docstring with a column-zero line opening with a quote right after a line ending in one splits into two fragments and a long sentence there passes. A fix should take boundaries from the AST string nodes in python_docstring_spans.
Activity
ptr727 commentedon Oct 11, 2026
Also found: a bullet marker (a dash or asterisk) counts as a word in a comment or docstring, and a numbered marker counts in a docstring and in Markdown, so an item of exactly the cap reports one word over. The Markdown reader does the same today. A fix should strip list markers in one shared place.
ptr727 commentedon Oct 11, 2026
Also found: adjacent-docstring splitting infers a boundary from quote characters, so a module docstring with a column-zero line opening with a quote right after a line ending in one splits into two fragments and a long sentence there passes. A fix should take boundaries from the AST string nodes in python_docstring_spans.
Promote the Comment and Docstring Sentence-Length Check and the Attes…
Read the Six Layouts the Sentence-Length Check Misread (#2846)
Promote the Integration-Id Required-Check Match and Six Sentence-Leng…