-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[MRG+1] DOC insert spaces before colons in parameter lists #7920
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
Conversation
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 -
There was a problem hiding this 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!
The dictionary to pretty print | ||
|
||
offset: int | ||
offset : int | ||
The offset in characters to add at the begin of each line. | ||
|
||
printer: |
There was a problem hiding this comment.
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... ;)
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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.
Will it be enforced in #7793 ? |
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. |
Ok, merging |
…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
…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
…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
…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
…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
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: