Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Keyword Args not recognized in Google convention with no return #651

Open
PDL213 opened this issue Aug 27, 2023 · 0 comments
Open

Keyword Args not recognized in Google convention with no return #651

PDL213 opened this issue Aug 27, 2023 · 0 comments

Comments

@PDL213
Copy link

PDL213 commented Aug 27, 2023

When using google convention with keyword args pydocstyle raises false positive D417 if no return is included.

def my_function(a, *, b): 
    """Print the sum of the two values.

    This docstring causes a D417 error.

    Args:
        a: First variable.

    Keyword Args:
        b: Second variable.
    """
    print(a+b)

The .pydocstylerc is at follows. Not listing a convention does not cause a false positive.

[pydocstyle]

convention = google

Adding a return and documentation resolves the false positive. This was repeated in Python 3.10 and 3.11 using pydocstyle 6.3.0.

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

No branches or pull requests

1 participant