Skip to content
This repository was archived by the owner on Nov 23, 2024. It is now read-only.
This repository was archived by the owner on Nov 23, 2024. It is now read-only.

For __init__ parameters in NumPyDoc: Look up documentation either on __init__ or containing class #10

@lars-reimann

Description

@lars-reimann

Is your feature request related to a problem?

Currently, we always jump directly to the class to find the documentation. This is incorrect for matplotlib.

Desired solution

First, check the docstring of the class. If nothing is found there, check the docstring of the __init__ method. This should be decided for each parameter. Example:

class C:
    """
    Parameters
    ----------
    x: str
        Lorem ipsum 1.
    z: str
        Lorem ipsum 3.
    """

    def __init__(self, x, y, z):
        """
        Parameters
        ----------
        y: str
            Lorem ipsum 2.
        z: str
            Lorem ipsum 4.
        """

For x the description should be "Lorem ipsum 1.". For y the description should be "Lorem ipsum 2.". For z the description should be "Lorem ipsum 3."

Possible alternatives (optional)

No response

Screenshots (optional)

No response

Additional Context (optional)

No response

Metadata

Metadata

Assignees

Labels

bug 🪲Something isn't working

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions