Allow varargs and kwargs to be prefixed with stars (#933)

This commit is contained in:
Charlie Marsh 2022-11-27 22:08:27 -05:00 committed by GitHub
parent 16da183f8e
commit 1a79965aa0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 34 additions and 25 deletions

View file

@ -73,7 +73,7 @@ expectation.expected.add((
"(found 'A')", arg_count=3)
@expect("D413: Missing blank line after last section ('Examples')",
arg_count=3)
def foo(var1, var2, long_var_name='hi'):
def foo(var1, var2, long_var_name='hi', **kwargs):
r"""A one-line summary that does not use variable names.
Several sentences providing an extended description. Refer to
@ -91,6 +91,8 @@ def foo(var1, var2, long_var_name='hi'):
detail, e.g. ``(N,) ndarray`` or ``array_like``.
long_var_name : {'hi', 'ho'}, optional
Choices in brackets, default first when optional.
**kwargs : int
More keyword arguments.
Returns
-------