Skip to content

Read the Remaining Sentence-Length Layouts Left by the Six-Layout Fix #2843

Closed

Description

@ptr727

Follow-up to #2838. The local review of its fix found layouts the sentence-length check still reads wrongly, left unfixed because each is a judgment call or beyond that issue's six:

  • A docstring body indented deeper than the opening quotes (a quote alone on its first line, or a module docstring with an indented body) reads every paragraph after a blank as an indented code block, so its long sentences pass. Indistinguishable from a real indented block without a convention choice.
  • In a non-Python comment, a non-prose line (a bare URL, or a nested key: line) inside an indented command or table run ends the run, so the lines after it are read as prose.
  • Continuation lines of a /* */ block comment carry no raw form, so the indent is 0 and the colon-run rule cannot fire inside one.
  • Google-style Note:, Warning:, See Also:, and Todo: bodies are still read as code under the colon-then-indent rule.

Activity

  1. ptr727 commented on Oct 11, 2026

    @ptr727
    OwnerAuthor

    Raised again on the promotion pull request #2847, with a concrete case for the last bullet: in a structured NumPy section, prose written at the entry indent (no name : type line above it) whose first line has six words or fewer and no closing punctuation is skipped as a head, so Short lead followed by 24 more words passes the 25-word cap. A description indented one level under its name : type line, as numpydoc lays it out, is counted correctly. A fix should tell a head from prose by something sturdier than a word count, and cover this case in a test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions