Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

DAR101: Ignore *args and **kwargs arguments marked as unused #187

Open
KRunchPL opened this issue Dec 19, 2021 · 0 comments
Open

DAR101: Ignore *args and **kwargs arguments marked as unused #187

KRunchPL opened this issue Dec 19, 2021 · 0 comments

Comments

@KRunchPL
Copy link

Summary

Varargs arguments prefixed with an underscore (*_remaining_args) are required in the docstring. I am not an expert in Python style, but I feel they should not be required, especially that names _something are not causing DAR101.

Reproduction

  1. Create a demo.py file with the following content
def foo(visible_arg, _hidden_arg, *_remaining_args, **_remaining_kwargs):
    """
    Noop

    :param visible_arg: some value
    """
  1. Execute darglint -s sphinx demo.py

Expected result

No DAR101 errors reported by darglint (all non-hidden args are defined in the docstring).

Actual result

Two DAR101 are shown:

demo.py:foo:4: DAR101: - **_remaining_kwargs
demo.py:foo:4: DAR101: - *_remaining_args 

Versions used

darglint 1.8.1
Python 3.10.0

Additional information

It would be a combination of those two issues: #60 #92

Gratitude

I would like to use an opportunity to say THANK YOU to the creator of this tool and other contributors.

Also (after reading some issue) I would like to thank the owner of the repo, for the way you are talking to your users (people that are reporting issues etc.). I would hope more owners would treat "their community" the way you do.

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