Skip to content

Commit 3999c48

Browse files
committed
fix(Modified-numpydoc_validation_exclude_files-option-to-only-activate-if-numpydoc_validation_checks-is-not-empty): Mimicing same behaviour as numpydoc_validation_exclude
1 parent d6b6aee commit 3999c48

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

numpydoc/numpydoc.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,10 @@ def mangle_docstrings(app: SphinxApp, what, name, obj, options, lines):
194194
else:
195195
# Test the obj to find the module path, and skip the check if it's path is matched by
196196
# numpydoc_validation_exclude_files
197-
if app.config.numpydoc_validation_exclude_files:
197+
if (
198+
app.config.numpydoc_validation_exclude_files
199+
and app.config.numpydoc_validation_checks
200+
):
198201
excluder = app.config.numpydoc_validation_files_excluder
199202
module = inspect.getmodule(obj)
200203
try:

0 commit comments

Comments
 (0)