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

Skip checking for one line docstings #45

Closed
Laleee opened this issue Dec 9, 2022 · 2 comments · Fixed by #47
Closed

Skip checking for one line docstings #45

Laleee opened this issue Dec 9, 2022 · 2 comments · Fixed by #47
Assignees

Comments

@Laleee
Copy link

Laleee commented Dec 9, 2022

Hello,

It would be good if checking could be skipped somehow for one line docstrings.

For example

def example(some_input: int) -> int:
    """Return input."""
    return some_input

Sometimes the effort to write the full doctoring is just too high. This is also fine with the linter pydocstyle.

Would you consider adding an option to ignore docstrings that are in one line?

@jshwi
Copy link
Owner

jshwi commented Dec 10, 2022

Hi @Laleee, I can look at this, I don't see why that couldn't be an option! Let me see what I can do. Cheers!

@jshwi jshwi self-assigned this Dec 10, 2022
jshwi added a commit that referenced this issue Dec 11, 2022
Added option to ignore docstrings where parameters are not documented

`E113` will still raise (when not disabled) if no docstring at all
@jshwi jshwi linked a pull request Dec 11, 2022 that will close this issue
@jshwi jshwi closed this as completed in #47 Dec 11, 2022
@jshwi
Copy link
Owner

jshwi commented Dec 11, 2022

@Laleee, that should do it
While it won't take into consideration whether the docstring is one line or several, it will ignore docstrings containing no parameter documentation, which will do what you want it to in that example

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

Successfully merging a pull request may close this issue.

2 participants