Skip to content

pydocstyle errors should not appear in .pyi files #6224

@DetachHead

Description

@DetachHead
# asdf.pyi
def asdf(): ...
>ruff asdf.pyi
asdf.pyi:1:5: D103 Missing docstring in public function
Found 1 error.

when adding a docstring, it triggers PYI021:

def asdf():
    """asdf"""
>ruff asdf.pyi
asdf.pyi:2:5: PYI021 Docstrings should not be included in stubs
Found 1 error.

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