Skip to content

Commit 8a7ed3c

Browse files
committed
Setup test cases for RST213/args and RST219/kwargs
1 parent f82b46f commit 8a7ed3c

File tree

3 files changed

+37
-2
lines changed

3 files changed

+37
-2
lines changed

tests/run_tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ echo "Good, no RST style violations reported, as expected."
2929
echo "================"
3030
echo "Extra directives"
3131
echo "================"
32-
# Checked this failed earlier in the RST303 tests
32+
# Checked this failed by default in the RST303 tests
3333
flake8 --select RST --rst-directives=req,spec,needfilter RST303/sphinx-directives.py
3434
echo "Good, no RST303 style violations reported, as expected."
3535

3636
echo "==========="
3737
echo "Extra roles"
3838
echo "==========="
39-
# Checked this failed earlier in the RST304 tests
39+
# Checked this failed by default in the RST304 tests
4040
flake8 --select RST --rst-roles need,need_incoming RST304/sphinx-roles.py
4141
echo "Good, no RST304 style violations reported, as expected."
4242

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
def module_level_function(param1, param2=None, *args, **kwargs):
2+
"""This is an example of a module level function.
3+
4+
Here using the Google docstring style, notice that we have *not* escaped
5+
the asterisk in ``*args*`` or ``**kwargs`` in the argument list.
6+
7+
Args:
8+
param1 (int): The first parameter.
9+
param2 (str, optional): The second parameter. Defaults to None.
10+
*args: Variable length argument list.
11+
**kwargs: Arbitrary keyword arguments.
12+
13+
...
14+
"""
15+
pass
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
def module_level_function(param1, param2=None, *args, **kwargs):
2+
"""This is an example of a module level function.
3+
4+
Here using the Numpy docstring style, notice that we have *not* escaped
5+
the asterisk in ``*args*`` or ``**kwargs`` in the parameter list.
6+
7+
Parameters
8+
----------
9+
param1 : int
10+
The first parameter.
11+
param2 : str optional
12+
The second parameter.
13+
*args
14+
Variable length argument list.
15+
**kwargs
16+
Arbitrary keyword arguments.
17+
18+
...
19+
"""
20+
pass

0 commit comments

Comments
 (0)