Skip to content

Fix more formatting inconsistencies - #13787

Merged
qinhanmin2014 merged 3 commits into
scikit-learn:masterfrom
Scowley4:scowley4-FixFormatting
May 5, 2019
Merged

qinhanmin2014 merged 3 commits into
scikit-learn:masterfrom
Scowley4:scowley4-FixFormatting

Conversation

@Scowley4

@Scowley4 Scowley4 commented May 4, 2019

Copy link
Copy Markdown
Contributor

Not sure how people feel about these kinds of changes, but I've just been writing a script to find inconsistencies in the code formatting.

All changes here are not super important, but because I am fixing things that only occur in a few places, it's obvious it is wrong.

Examples

Incorrect header delimiter

Parameters
==========

to

Parameters
----------

Incorrect number of header delimiters

Parameters
-------

to

Parameters
----------

Insufficient spaces before inline comment

See https://www.python.org/dev/peps/pep-0008/#inline-comments

Inline comments should be separated by at least two spaces from the statement.

logo.get_n_splits(groups=groups) # 'groups' is always required

to

logo.get_n_splits(groups=groups)  # 'groups' is always required

@Scowley4

Scowley4 commented May 4, 2019

Copy link
Copy Markdown
Contributor Author

It's showing commits from #13747 for some reason...
This PRs changes are only after "Merge branch ...".

@jnothman

jnothman commented May 5, 2019

Copy link
Copy Markdown
Member

You needed to start your new branch at master, e.g. git checkout -b new-branch-name master... To fix it now you could do git rebase -i master and drop any commits you don't write in this branch`, then check your log is correct and force-push to GitHub.

We have not historically fixed pep8 issues to avoid conflicts in other pull requests. I don't know if that's a big risk now that many files are fairly stable.

I'm very happy to see the docstring improvements.

@Scowley4
Scowley4 force-pushed the scowley4-FixFormatting branch from 158cc9c to 6367997 Compare May 5, 2019 12:43

@qinhanmin2014 qinhanmin2014 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks @Scowley4

@qinhanmin2014
qinhanmin2014 merged commit 612a04e into scikit-learn:master May 5, 2019
@Scowley4
Scowley4 deleted the scowley4-FixFormatting branch May 5, 2019 14:25
jnothman pushed a commit to jnothman/scikit-learn that referenced this pull request May 6, 2019
koenvandevelde pushed a commit to koenvandevelde/scikit-learn that referenced this pull request Jul 12, 2019
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.

4 participants