Skip to content

MAINT Improve method detection in numpydoc validation script - #15532

Merged
glemaitre merged 3 commits into
scikit-learn:masterfrom
rth:fix-improve-method-detections-test-docstrings
Nov 16, 2019
Merged

glemaitre merged 3 commits into
scikit-learn:masterfrom
rth:fix-improve-method-detections-test-docstrings

Conversation

@rth

@rth rth commented Nov 4, 2019

Copy link
Copy Markdown
Member

This improves estimator method detection in the test_docstrings.py. Previously all objects in the estimator class namespace were considered as methods (which kind of worked in most cases).

This restricts method search only to callable objects, and also applies a fix for properties as inspect.signature doesn't work for those. This previously producing errors in the validator (see e.g. #15509)

@rth rth changed the title MAINT Improve method dectection in numpydoc validation script MAINT Improve method detection in numpydoc validation script Nov 4, 2019
@rth
rth requested a review from glemaitre November 15, 2019 20:34
@glemaitre
glemaitre merged commit cd81de1 into scikit-learn:master Nov 16, 2019
@glemaitre

Copy link
Copy Markdown
Member

Oh I reviewed 10 days ago but forgot to merge it.
LGTM

@rth
rth deleted the fix-improve-method-detections-test-docstrings branch November 16, 2019 12:20
@rth

rth commented Nov 16, 2019

Copy link
Copy Markdown
Member Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants