Skip to content

SIG306 false positive when description ends with an RST code block #955

Description

@jshwi

A param description that introduces an RST code block with :: captures
the block's indented content as part of the description text. The SIG306
check looks at the last character of the description, and code block
content typically doesn't end with a sentence terminator, so the check
fires a false positive.

Example:

def func(x) -> None:
    """Summary.

    :param x: Example usage::

        foo(x=1)
    """

Expected: no SIG306, since the prose portion of the description ends
correctly and the trailing content is a code block.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions