Skip to content

Commit 231dcd8

Browse files
committed
Exclude dunders from numpydoc validation
1 parent 62c2efb commit 231dcd8

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/conf.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,17 @@
188188
numpydoc_skip_errors = tomllib.load(f)["numpydoc_skip_errors"]
189189

190190
numpydoc_validation_checks = {"all"} | set(numpydoc_skip_errors)
191+
numpydoc_validation_exclude = { # regex to ignore during docstring check
192+
r"\.__getitem__",
193+
r"\.__contains__",
194+
r"\.__hash__",
195+
r"\.__mul__",
196+
r"\.__sub__",
197+
r"\.__add__",
198+
r"\.__iter__",
199+
r"\.__div__",
200+
r"\.__neg__",
201+
}
191202

192203
# Add any paths that contain custom static files (such as style sheets) here,
193204
# relative to this directory. They are copied after the builtin static files,

0 commit comments

Comments
 (0)