NilsJPWerner / autoDocstring

VSCode extension that generates docstrings for python files
MIT License
676 stars 163 forks source link

Arbitrary argument lists (*args) being ignored by docstring generator #171

Open osharaki opened 3 years ago

osharaki commented 3 years ago

Describe the bug Arbitrary argument lists (*args) are not included in the list of arguments generated by autoDocstring.

Versions (please complete the following information):

Original Code (with line to generate on):

def foo(*args: List[int]):
# generate on this line
    pass

Expected Result:

def foo(*args: List[int]):
    """
    [summary]

    Args:
        *args: Variable length argument list.
    """
    pass

Actual Result:

def foo(*args: List[int]):
    """
    [summary]
    """
    pass

Additional context I'm using the Google docstring format, but the behavior is reproducible using all other formats. The corresponding section in Google's style guide can be found here and a concrete example here.

benblo commented 3 years ago

Same goes for kwargs btw.

IceTDrinker commented 2 years ago

Hello is there any news on this?

Perhaps some pointers as to what would be needed so that we can contribute a PR to provide support for it?

Cheers

NilsJPWerner commented 2 years ago

I'm currently working on this

IceTDrinker commented 2 years ago

I'm currently working on this

Awesome, thanks!