Skip to content

Commit 439a296

Browse files
committed
docs(validation.rst,-install.rst): Added docs for new feature numpydoc_validation_exclude_files for Sphinx and exclude_files for pyproject.toml
1 parent 3999c48 commit 439a296

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

doc/install.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,18 @@ numpydoc_validation_exclude : set
139139
validation.
140140
Only has an effect when docstring validation is activated, i.e.
141141
``numpydoc_validation_checks`` is not an empty set.
142+
numpydoc_validation_exclude_files : set
143+
A container of strings using :py:mod:`re` syntax specifying path patterns to
144+
ignore for docstring validation.
145+
For example, to skip docstring validation for all objects in
146+
``tests\``::
147+
148+
numpydoc_validation_exclude_files = {"$.*tests/.*"}
149+
150+
The default is an empty set meaning no paths are excluded from docstring
151+
validation.
152+
Only has an effect when docstring validation is activated, i.e.
153+
``numpydoc_validation_checks`` is not an empty set.
142154
numpydoc_validation_overrides : dict
143155
A dictionary mapping :ref:`validation checks <validation_checks>` to a
144156
container of strings using :py:mod:`re` syntax specifying patterns to

doc/validation.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ the pre-commit hook as follows:
3737
maps to ``numpydoc_validation_exclude`` from the
3838
:ref:`Sphinx build configuration <validation_during_sphinx_build>`.
3939
* ``exclude_files``: Exclude file paths matching the regular expressions
40-
``^tests/.*`` or ``^module/gui.*``.
40+
``^tests/.*`` or ``^module/gui.*``. This maps to
41+
``numpydoc_validation_exclude_files`` from the
42+
:ref:`Sphinx build configuration <validation_during_sphinx_build>`.
4143
* ``override_SS05``: Allow docstrings to start with "Process ", "Assess ",
4244
or "Access ". To override different checks, add a field for each code in
4345
the form of ``override_<code>`` with a collection of regular expression(s)

0 commit comments

Comments
 (0)