Repository navigation
Conversation
|
It also needs to display correctly in the generated HTML docs (install sphinx and matplotlib and run |
|
The HTML docs seem to look good... and also most other classifiers have docstring defined this way.... Would you mind checking the docstrings for a few classifiers like I am wondering if this issue is localized to my shell... Sorry for troubling you :p |
|
Could I expand this PR to correct all such docstrings? |
|
I'm not surprised that But all I meant by my previous comment was that the geography wasn't going to be visible in HTML, so "or" or "else" is necessary. But sure, widen the scope. |
51f40b0 to
b9cb829
Compare
ef3a10f to
d94f2a3
Compare
869205f to
463f47c
Compare
|
Have you checked whether shpinx threw any additional "column span alignment" errors after your changes? |
|
Yea :) The |
463f47c to
ef8681f
Compare
There was a problem hiding this comment.
Is there a doc test that automatically reports error for this kind of typo?
( The previous, under sphinx had made the entire line appear in bold like shown highlighted here )
There was a problem hiding this comment.
there is no test for this, but it should result in a sphinx error. I'm not sure how many sphinx errors we currently have (it frequently gets very bad) and if it is visible at all.
There was a problem hiding this comment.
More broadly, we need to merge our numpydoc back into the numpydoc project, and add fixes there...
There was a problem hiding this comment.
Note they've spun it off as a separate project/pypi package, so it should be here as a dependency or marked as external.
6df77ae to
cd57944
Compare
cd57944 to
0e94ba5
Compare
|
I am pretty certain that I introduced some of the backslashes for column span alignment errors, so it would be good to double check that removing them will not introduce them again. So you said you did a diff on the log of |
|
Oh... I don't think I did that... I'll try cleaning the doc folder in between and let you know the results... |
|
Yea I did that... and this diff file seemed to not have any of the "column, span, alignment or error" words in it... (except for span / error words in the file name)... I guess its good then? |
|
Seems good. +1 then. |
|
Thanks :) |
There was a problem hiding this comment.
I frankly dislike this outdenting in the source code, which is at least as important as help output. I'd rather investigate whether numpydoc has a mechanism for handling oversize parameter type descriptions, and if not, proposing one at the numpydoc project (and again, working towards merging the divergent implementation in scikit-learn).
|
@jnothman in general this pr is all about converting indented backslash-ed extension of previous line to outdented form... To Such that it is displayed in the docstring correctly... ( both were being rendered by sphinx correctly ) I agree with the fact that it does make the code look ugly... Please advice me on how I should proceed with this pr.... :) |
Seeing as no solution we've found by simply modifying the docstring has satisfied all targets...: Create an issue to document the problem, and try and solve it the right way. If it's an issue of how to represent these things and how that gets processed into sphinx code, fix it there. |
|
Hmm thanks... I'll close this now? |
|
Thanks for your effort on this in any case! |
|
This I feel can be fixed by making the below : To render correctly in sphinx... |
|
That may not be a good solution because I think currently something like: is supported. So then you'd run into ambiguity. So I'd rather the double-indent for continuation (or the fact that there is more indent before less indent, before back to baseline). The current just takes typespec as the rest of the line; and description as everything between that and the next text at the baseline. Alternatively, |

\at the end of 1st line.docstring
Before :
After :
html
No change
A very minor PR, @jnothman could you take a look...