Skip to content

Simplify the test and remove the empty DOCSTRING_IGNORE_LIST #21466

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions maint_tools/test_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@

numpydoc_validation = pytest.importorskip("numpydoc.validate")

# List of modules ignored when checking for numpydoc validation.
DOCSTRING_IGNORE_LIST = []

FUNCTION_DOCSTRING_IGNORE_LIST = [
"sklearn._config.config_context",
"sklearn._config.get_config",
Expand Down Expand Up @@ -396,12 +393,6 @@ def repr_errors(res, estimator=None, method: Optional[str] = None) -> str:

@pytest.mark.parametrize("function_name", get_all_functions_names())
def test_function_docstring(function_name, request):
"""Check function docstrings using numpydoc."""
if function_name in FUNCTION_DOCSTRING_IGNORE_LIST:
request.applymarker(
pytest.mark.xfail(run=False, reason="TODO pass numpydoc validation")
)

res = numpydoc_validation.validate(function_name)

res["errors"] = list(filter_errors(res["errors"], method="function"))
Expand All @@ -421,11 +412,6 @@ def test_docstring(Estimator, method, request):

import_path = ".".join(import_path)

if Estimator.__name__ in DOCSTRING_IGNORE_LIST:
request.applymarker(
pytest.mark.xfail(run=False, reason="TODO pass numpydoc validation")
)

res = numpydoc_validation.validate(import_path)

res["errors"] = list(filter_errors(res["errors"], method, Estimator=Estimator))
Expand Down