mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 13:51:37 +00:00
Allow varargs and kwargs to be prefixed with stars (#933)
This commit is contained in:
parent
16da183f8e
commit
1a79965aa0
3 changed files with 34 additions and 25 deletions
|
@ -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
|
||||
-------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue