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

False positive DOC201 #125

Open
ddelange opened this issue Feb 21, 2024 · 1 comment
Open

False positive DOC201 #125

ddelange opened this issue Feb 21, 2024 · 1 comment

Comments

@ddelange
Copy link

Hi 👋

This function edits inplace and doesn't have a return value:

def smoothen_values(list_smooth: list[str], key: str):
    """Edit list_smooth inplace.

    Args:
        list_smooth: A list with keys.
        key: The key to add.
    """
    if len(list_smooth) <= 1:
        return
    list_smooth += [key]

It throws a DOC201: Function smoothen_values does not have a return section in docstring false positive.

@jsh9
Copy link
Owner

jsh9 commented Mar 1, 2024

Interesting. This is an edge case that this option does not cover: https://jsh9.github.io/pydoclint/config_options.html#9---require-return-section-when-returning-nothing-shortform--rrs-default-false

I think I'll add a patch to cover this case.

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