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

Possible bug? DOC105 for arguments with default values? #179

Open
mazer-ai opened this issue Nov 7, 2024 · 1 comment
Open

Possible bug? DOC105 for arguments with default values? #179

mazer-ai opened this issue Nov 7, 2024 · 1 comment

Comments

@mazer-ai
Copy link

mazer-ai commented Nov 7, 2024

I'm trying to specify default argument values in numpy-style docstrings and getting DOC105 errors. For example:

def bar(x: bool = True) -> None:
    """
    Make a bar.

    Parameters
    ----------
    x: bool, default True
        Value of the bar
    """
    pass

generates a DOC105 error even though it appears to be right out of the numpy style guide about default values:
image

Before I start diving into the code, I was wondering if this is an intentional decision or if I'm misunderstanding the style guide for how to specify defaults in docstrings.

@jsh9
Copy link
Owner

jsh9 commented Nov 7, 2024

Yes, this is intentional.

Please see more explanations here: https://jsh9.github.io/pydoclint/notes_for_users.html#3-notes-on-writing-type-hints

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants