Skip to content

__init__ docstring appears in class documentation #255

@janscience

Description

@janscience

Expected Behavior

Since by default pdoc3 ignores __init__(self) functions of classes, a docstring of an __init__(self) function should not appear anywhere in the generated documentation.

Actual Behavior

The whole docstring of the __init__(self) function is appended (nicely formatted) to the documentation of the class.

Steps to Reproduce

class TestDoc:
    """Test the docs.
    """

    def __init__(self, a):
        """Init the class.

        Some more info that is NOT supposed to show up in the documentation of the `TestDoc` class.
        """
        self.a = a

Additional info

  • pdoc version: 0.9.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions