Skip to content

MAINT Improve method detection in numpydoc validation script #15532

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

Conversation

rth
Copy link
Member

@rth rth commented Nov 4, 2019

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
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
Copy link
Member Author

rth commented Nov 16, 2019

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