Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lars-reimann opened this issue Aug 3, 2022 · 0 comments
Assignees
Labels
bug 🪲 Something isn't working

Comments

@lars-reimann
Copy link
Member

lars-reimann commented Aug 3, 2022

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

@lars-reimann lars-reimann added enhancement 💡 New feature or request bug 🪲 Something isn't working and removed enhancement 💡 New feature or request labels Aug 3, 2022
@lars-reimann lars-reimann transferred this issue from Safe-DS/API-Editor Mar 19, 2023
@lars-reimann lars-reimann changed the title For constructor parameters: Look up documentation either on constructor or containing class For __init__ parameters: Look up documentation either on __init__ or containing class Apr 27, 2023
@lars-reimann lars-reimann changed the title For __init__ parameters: Look up documentation either on __init__ or containing class For __init__ parameters in NumPyDoc: Look up documentation either on __init__ or containing class Apr 27, 2023
Masara added a commit that referenced this issue May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working
Projects
Status: In Progress
Development

No branches or pull requests

2 participants