Skip to content

Put constructor parameter docstring into __init__ docstrings #4414

Open
@michaelosthege

Description

@michaelosthege

Description of your problem

Reviewing #4411 I noticed that many classes have the documentation about the __init__ parameters in the class docstring and are missing the __init__ docstring entirely.

According to PEP 257...

The docstring for a class should summarize its behavior and list the public methods and instance variables. If the class is intended to be subclassed, and has an additional interface for subclasses, this interface should be listed separately (in the docstring). The class constructor should be documented in the docstring for its __init__ method.

(formatting by me)

Examples:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions