Skip to content
9 changes: 8 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,14 @@
# master_doc = "index" # NOTE: will be changed to `root_doc` in sphinx 4

numpydoc_xref_param_type = True
numpydoc_xref_ignore = {"optional", "type_without_description", "BadException"}
numpydoc_xref_ignore = {
"optional",
"type_without_description",
"BadException",
"keyword-only",
"positional-only",
}

# Run docstring validation as part of build process
numpydoc_validation_checks = {"all", "GL01", "SA04", "RT03"}

Expand Down
7 changes: 7 additions & 0 deletions doc/format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,13 @@ used as a value, ``optional`` is preferred. These are all equivalent::
copy : bool, default=True
copy : bool, default: True

Use ``positional-only`` for positional-only parameters, and ``keyword-only``
for keyword-only parameters::

x : int, positional-only
y : int, keyword-only
z : int, keyword-only, optional

When a parameter can only assume one of a fixed set of values,
those values can be listed in braces, with the default appearing first::

Expand Down
2 changes: 1 addition & 1 deletion doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ numpydoc_xref_ignore : set or ``"all"``
used in parameter type descriptions that may be confused for
classes of the same name. For example::

numpydoc_xref_ignore = {'type', 'optional', 'default'}
numpydoc_xref_ignore = {'type', 'optional', 'default', 'keyword-only', 'positional-only'}

The default is an empty set.

Expand Down
Loading