Skip to content

DOC/FIX indentation in deprecated estimators#16379

Merged
rth merged 1 commit intoscikit-learn:masterfrom
johannfaouzi:deprecated-doc
Feb 4, 2020
Merged

DOC/FIX indentation in deprecated estimators#16379
rth merged 1 commit intoscikit-learn:masterfrom
johannfaouzi:deprecated-doc

Conversation

@johannfaouzi
Copy link
Copy Markdown
Contributor

Reference Issues/PRs

Fixes #15741

What does this implement/fix? Explain your changes.

This small PR adds 4 whitespaces when the docstring is updated. Why? Because functions and classes are indented, so are their docstrings, thus a new paragraph must start with 4 whitespaces. \t does not work as good, because there are really 4 whitespaces in docstrings.

Any other comments?

I did not try on scikit-learn repository but on a project of mine (so that the documentation builds faster), I will try to have a look at the documentation from Circle CI to see if this works as expected.

@johannfaouzi johannfaouzi changed the title Add four whitespaces for the next paragraph [MRG] Add four whitespaces for the next paragraph when the docstring is updated in deprecated Feb 4, 2020
@johannfaouzi
Copy link
Copy Markdown
Contributor Author

Example: old vs new for sklearn.utils.safe_indexing

@rth
Copy link
Copy Markdown
Member

rth commented Feb 4, 2020

Example: old vs new for sklearn.utils.safe_indexing

Thanks! Could you please comment more on what should be changed as for me those two look identical (aside from the dev version banner) :)

@johannfaouzi
Copy link
Copy Markdown
Contributor Author

johannfaouzi commented Feb 4, 2020 via email

@thomasjpfan
Copy link
Copy Markdown
Member

master

Screen Shot 2020-02-04 at 2 08 34 PM

This PR

Screen Shot 2020-02-04 at 2 08 42 PM

Copy link
Copy Markdown
Member

@rth rth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, thanks @johannfaouzi !

@rth rth changed the title [MRG] Add four whitespaces for the next paragraph when the docstring is updated in deprecated DOC/FIX indentation in deprecated estimators Feb 4, 2020
@rth rth merged commit 5bb6913 into scikit-learn:master Feb 4, 2020
@johannfaouzi johannfaouzi deleted the deprecated-doc branch February 5, 2020 08:01
thomasjpfan pushed a commit to thomasjpfan/scikit-learn that referenced this pull request Feb 22, 2020
panpiort8 pushed a commit to panpiort8/scikit-learn that referenced this pull request Mar 3, 2020
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.

[DOC] sklearn.utils.deprecated yields indentations in HTML output

3 participants