Skip to content

Methods in class docstring interpreted as additional attributes #247

@hghugdal

Description

@hghugdal

Adding a methods section in class docstrings in line with the numpy docstring style raises a violation code DOC603. For instance, a numpy style docstring

class Class():
"""
Parameters
------------
(...)

Attributes
-----------
(...)

Methods
----------
values()
    get list if instance attribute values
"""

gives
DOC603: Class 'Class': Class docstring attributes are different from actual class attributes. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the docstring but not in the actual class attributes: [-------: , Methods: , values(): ]. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)

Is this because Methods sections in class docstrings are not supported?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions