Skip to content

[MRG+1] DOC insert spaces before colons in parameter lists#7920

Merged
TomDLT merged 2 commits intoscikit-learn:masterfrom
jnothman:colon
Nov 25, 2016
Merged

[MRG+1] DOC insert spaces before colons in parameter lists#7920
TomDLT merged 2 commits intoscikit-learn:masterfrom
jnothman:colon

Conversation

@jnothman
Copy link
Copy Markdown
Member

@jnothman jnothman commented Nov 21, 2016

Complies with numpydoc to improve rendering, as well as automatic quality assurance as in #7793.
Affects listings of Parameters Attributes, Returns.

Performed with the help of:

grep -nE '^(    )+[a-zA-Z][a-zA-Z0-9_]*: ' sklearn -R |
grep -v -e externals -e tests -e default: -e else: -e Warning: -e Note: \
 -e TRAIN: -e Default: -e True: -e False: -e DOI: -e In: |
gsed 's|\([^:]*\):\([0-9]*\):\([^:]*\):\(.*\)|--- a/\1\n+++ b/\1\n@@ -\2,1 +\2,1 @@\n-\3:\4\n+\3 :\4|' |
git apply --unidiff-zero -

Complies with numpydoc to improve rendering and automatic quality
assurance such as scikit-learn#7793. Affects listings of Parameters Attributes,
Returns.

Performed with the help of:

    grep -nE '^(    )+[a-zA-Z][a-zA-Z0-9_]*: ' sklearn -R | grep -v -e
    externals -e tests | grep -v -e default: -e else: -e Warning: -e Note:
    -e TRAIN: -e Default: -e True: -e False: -e DOI: -e In: | gsed
    's|\([^:]*\):\([0-9]*\):\([^:]*\):\(.*\)|--- a/\1\n+++ b/\1\n@@ -\2,1
    +\2,1 @@\n-\3:\4\n+\3 :\4|' | git apply --unidiff-zero -
Copy link
Copy Markdown
Member

@raghavrv raghavrv left a comment

Choose a reason for hiding this comment

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

Sweet. LGTM! (Have verified the diff to make sure there are no undesired changes). Thx!

sklearn/base.py Outdated
offset : int
The offset in characters to add at the begin of each line.

printer:
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.

This somehow slipped through your pretty nifty grep / sed commands... ;)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

well numpydoc doesn't actually support a colon without something following...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixing this, and looked for others like it.

@jnothman jnothman added the Easy Well-defined and straightforward way to resolve label Nov 24, 2016
@jnothman jnothman changed the title [MRG] DOC insert spaces before colons in parameter lists [MRG+1] DOC insert spaces before colons in parameter lists Nov 24, 2016
@TomDLT
Copy link
Copy Markdown
Member

TomDLT commented Nov 24, 2016

Will it be enforced in #7793 ?

@jnothman
Copy link
Copy Markdown
Member Author

It's not really easy to do all in one go. Much easier to fix this kind of lint error then check for discrepancy. I'm building a linter/fixer for both kinds of issue.

@TomDLT
Copy link
Copy Markdown
Member

TomDLT commented Nov 25, 2016

Ok, merging

@TomDLT TomDLT merged commit 8570622 into scikit-learn:master Nov 25, 2016
sergeyf pushed a commit to sergeyf/scikit-learn that referenced this pull request Feb 28, 2017
…arn#7920)

* DOC insert spaces before colons in parameter lists

Complies with numpydoc to improve rendering and automatic quality
assurance such as scikit-learn#7793. Affects listings of Parameters Attributes,
Returns.

Performed with the help of:

    grep -nE '^(    )+[a-zA-Z][a-zA-Z0-9_]*: ' sklearn -R | grep -v -e
    externals -e tests | grep -v -e default: -e else: -e Warning: -e Note:
    -e TRAIN: -e Default: -e True: -e False: -e DOI: -e In: | gsed
    's|\([^:]*\):\([0-9]*\):\([^:]*\):\(.*\)|--- a/\1\n+++ b/\1\n@@ -\2,1
    +\2,1 @@\n-\3:\4\n+\3 :\4|' | git apply --unidiff-zero -

* DOC fix numpydoc format for param
Sundrique pushed a commit to Sundrique/scikit-learn that referenced this pull request Jun 14, 2017
…arn#7920)

* DOC insert spaces before colons in parameter lists

Complies with numpydoc to improve rendering and automatic quality
assurance such as scikit-learn#7793. Affects listings of Parameters Attributes,
Returns.

Performed with the help of:

    grep -nE '^(    )+[a-zA-Z][a-zA-Z0-9_]*: ' sklearn -R | grep -v -e
    externals -e tests | grep -v -e default: -e else: -e Warning: -e Note:
    -e TRAIN: -e Default: -e True: -e False: -e DOI: -e In: | gsed
    's|\([^:]*\):\([0-9]*\):\([^:]*\):\(.*\)|--- a/\1\n+++ b/\1\n@@ -\2,1
    +\2,1 @@\n-\3:\4\n+\3 :\4|' | git apply --unidiff-zero -

* DOC fix numpydoc format for param
NelleV pushed a commit to NelleV/scikit-learn that referenced this pull request Aug 11, 2017
…arn#7920)

* DOC insert spaces before colons in parameter lists

Complies with numpydoc to improve rendering and automatic quality
assurance such as scikit-learn#7793. Affects listings of Parameters Attributes,
Returns.

Performed with the help of:

    grep -nE '^(    )+[a-zA-Z][a-zA-Z0-9_]*: ' sklearn -R | grep -v -e
    externals -e tests | grep -v -e default: -e else: -e Warning: -e Note:
    -e TRAIN: -e Default: -e True: -e False: -e DOI: -e In: | gsed
    's|\([^:]*\):\([0-9]*\):\([^:]*\):\(.*\)|--- a/\1\n+++ b/\1\n@@ -\2,1
    +\2,1 @@\n-\3:\4\n+\3 :\4|' | git apply --unidiff-zero -

* DOC fix numpydoc format for param
paulha pushed a commit to paulha/scikit-learn that referenced this pull request Aug 19, 2017
…arn#7920)

* DOC insert spaces before colons in parameter lists

Complies with numpydoc to improve rendering and automatic quality
assurance such as scikit-learn#7793. Affects listings of Parameters Attributes,
Returns.

Performed with the help of:

    grep -nE '^(    )+[a-zA-Z][a-zA-Z0-9_]*: ' sklearn -R | grep -v -e
    externals -e tests | grep -v -e default: -e else: -e Warning: -e Note:
    -e TRAIN: -e Default: -e True: -e False: -e DOI: -e In: | gsed
    's|\([^:]*\):\([0-9]*\):\([^:]*\):\(.*\)|--- a/\1\n+++ b/\1\n@@ -\2,1
    +\2,1 @@\n-\3:\4\n+\3 :\4|' | git apply --unidiff-zero -

* DOC fix numpydoc format for param
maskani-moh pushed a commit to maskani-moh/scikit-learn that referenced this pull request Nov 15, 2017
…arn#7920)

* DOC insert spaces before colons in parameter lists

Complies with numpydoc to improve rendering and automatic quality
assurance such as scikit-learn#7793. Affects listings of Parameters Attributes,
Returns.

Performed with the help of:

    grep -nE '^(    )+[a-zA-Z][a-zA-Z0-9_]*: ' sklearn -R | grep -v -e
    externals -e tests | grep -v -e default: -e else: -e Warning: -e Note:
    -e TRAIN: -e Default: -e True: -e False: -e DOI: -e In: | gsed
    's|\([^:]*\):\([0-9]*\):\([^:]*\):\(.*\)|--- a/\1\n+++ b/\1\n@@ -\2,1
    +\2,1 @@\n-\3:\4\n+\3 :\4|' | git apply --unidiff-zero -

* DOC fix numpydoc format for param
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Easy Well-defined and straightforward way to resolve Waiting for Reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants