@@ -25,11 +25,15 @@ command line options for this hook:
25
25
Using a config file provides additional customization. Both ``pyproject.toml ``
26
26
and ``setup.cfg `` are supported; however, if the project contains both
27
27
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 ".
33
37
34
38
``pyproject.toml ``::
35
39
@@ -40,13 +44,18 @@ the class/method/function with name "__init__" to not have a docstring).
40
44
"SA01",
41
45
"ES01",
42
46
]
47
+ exclude = [
48
+ '\.undocumented_method$',
49
+ '\.__repr__$',
50
+ ]
43
51
override_SS05 = '^((Process|Assess|Access) )'
44
52
override_GL08 = '^(__init__)$'
45
53
46
54
``setup.cfg ``::
47
55
48
56
[tool:numpydoc_validation]
49
57
checks = all,EX01,SA01,ES01
58
+ exclude = \.undocumented_method$,\.__repr__$
50
59
override_SS05 = ^((Process|Assess|Access) )
51
60
override_GL08 = ^(__init__)$
52
61
0 commit comments