Make parameter docstrings match function/constuctor signatures
See original GitHub issueContinue #9206 and finish up the rest of the docstrings.
Uncomment the untested modules in sklearn/tests/test_docstring_parameters.py
, fix doc inconsistencies and make all tests pass.
todo (modules)
- ‘sklearn.cross_decomposition’, (@clemkoa)
- ‘sklearn.discriminant_analysis’, (@clemkoa)
- ‘sklearn.ensemble’, (@clemkoa)
- ‘sklearn.feature_selection’, (@clemkoa)
- ‘sklearn.kernel_approximation’, (@clemkoa)
- ‘sklearn.model_selection’,
- ‘sklearn.multioutput’,
- ‘sklearn.random_projection’, #11405
- ‘sklearn.svm’ #11405
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:17 (17 by maintainers)
Top Results From Across the Web
Tool to compare function signature to docstring - Stack Overflow
I just created a tool to achieve this, called pydoctest . It will attempt to infer the types in your docstrings (not just...
Read more >autodoc pulls parent constructor docstring when subclass has ...
I'm guessing this behavior matches how function docstrings are inherited. For functions this behavior makes sense because, I think, modifying ...
Read more >Style guide — numpydoc v1.6.0rc1.dev0 Manual
The function signature is normally found by introspection and displayed by the ... Parameters section of the docstring details the constructor's parameters.
Read more >PEP 257 – Docstring Conventions
The one-line docstring should NOT be a “signature” reiterating the function/method parameters (which can be obtained by introspection).
Read more >Documenting Python APIs with docstrings
'Parameters' is a description of a function or method's arguments and their respective types. Parameters should be listed in the same order as...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@vrishank97 I will put a PR for fixing the docstrings in a few minutes
I’ll take
‘sklearn.ensemble’, ‘sklearn.feature_selection’, ‘sklearn.kernel_approximation’
for the next one!
Edit: been really busy lately so if anybody wants to take these it’s fine, just leave a comment. Sorry for the delay