-
Notifications
You must be signed in to change notification settings - Fork 540
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
[WIP] Fixing Indentation for Docstring Generators #3650
[WIP] Fixing Indentation for Docstring Generators #3650
Conversation
rerun tests |
rerun tests |
Codecov Report
@@ Coverage Diff @@
## branch-0.19 #3650 +/- ##
===============================================
+ Coverage 80.70% 81.22% +0.51%
===============================================
Files 227 228 +1
Lines 17615 17870 +255
===============================================
+ Hits 14217 14515 +298
+ Misses 3398 3355 -43
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@gpucibot merge |
When using the decorator
@insert_into_docstring
, the indentation level of the docstring is not taken into consideration. This causes documentation errors. For example, the generated docstring forRandomForestClassifier.predict()
is:The incorrect indentation for the
X
parameter is shown in the generated documentation:This PR uses
inspect.getdoc()
to correctly normalize any docstrings indentation. This results in the following docstring:And the generated html docs look better as well: