Skip to content

Commit 8a88bda

Browse files
committed
Update docs for global exclusion option.
1 parent cd4316c commit 8a88bda

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

doc/validation.rst

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,15 @@ command line options for this hook:
2525
Using a config file provides additional customization. Both ``pyproject.toml``
2626
and ``setup.cfg`` are supported; however, if the project contains both
2727
you must use the ``pyproject.toml`` file. The example below configures
28-
the pre-commit hook to ignore three checks (using the same logic as the
29-
:ref:`validation during Sphinx build <_validation_during_sphinx_build>`)
30-
and specifies exceptions to the checks ``SS05`` (allow docstrings to
31-
start with "Process ", "Assess ", or "Access ") and ``GL08`` (allow
32-
the class/method/function with name "__init__" to not have a docstring).
28+
the pre-commit hook as follows:
29+
30+
* ``checks``: Run all checks except ``EX01``, ``SA01``, and ``ES01`` (using the
31+
same logic as the :ref:`validation during Sphinx build
32+
<_validation_during_sphinx_build>`).
33+
* ``exclude``: Don't report any issues on anything matching the regular
34+
regular expressions ``\.undocumented_method$`` or ``\.__repr__$``.
35+
* ``override_SS05``: Allow docstrings to start with "Process ", "Assess ",
36+
or "Access ".
3337

3438
``pyproject.toml``::
3539

@@ -40,13 +44,18 @@ the class/method/function with name "__init__" to not have a docstring).
4044
"SA01",
4145
"ES01",
4246
]
47+
exclude = [
48+
'\.undocumented_method$',
49+
'\.__repr__$',
50+
]
4351
override_SS05 = '^((Process|Assess|Access) )'
4452
override_GL08 = '^(__init__)$'
4553

4654
``setup.cfg``::
4755

4856
[tool:numpydoc_validation]
4957
checks = all,EX01,SA01,ES01
58+
exclude = \.undocumented_method$,\.__repr__$
5059
override_SS05 = ^((Process|Assess|Access) )
5160
override_GL08 = ^(__init__)$
5261

0 commit comments

Comments
 (0)