-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Docstring Redesign to fix the problem of unexpected keyword arg (issue10888) #11011
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
@jreback Is this one ok to merge? |
needs tests |
So this is simply a DOC problem where users use the wrong parameters specified in Documentation but they don't belong to those methods. I've fixed the documentation so users won't get confused again. I don't think unit tests are needed for this PR. |
@@ -1494,7 +1494,7 @@ def to_html(self, buf=None, columns=None, col_space=None, colSpace=None, | |||
if buf is None: | |||
return formatter.buf.getvalue() | |||
|
|||
@Appender(fmt.docstring_to_string, indents=1) | |||
@Appender(fmt.common_docstring + fmt.return_docstring, indents=1) |
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.
can you make these all be separated by \n
so this is consistent.
can you post before-after of the doc-strings |
|
||
Returns | ||
------- | ||
formatted : string (or unicode, depending on data and options)""" | ||
|
||
docstring_to_string = common_docstring + "\n" + justify_docstring + "\n" + force_unicode_docstring + return_docstring |
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.
no \n
is needed between commong_docstring and justify_docstring
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.
btw, where is this variable used?
Apart from the few comments, looks good! |
@jreback @jorisvandenbossche Thanks! They look better now! |
common_docstring = """ | ||
Parameters | ||
---------- | ||
frame : DataFrame |
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.
frame should come out, we don't normally document the type of the self paramater (and thus its confusing).
@jreback Thanks. Anything else I should change before I add a new burden to Travis? |
…arg (issue10888) (+1 squashed commit) Squashed commits: [ab61a77] DOC/BUG: Docstring Redesign to fix the problem of unexpected keyword arg (issue10888) (+1 squashed commit) Squashed commits: [ad08eac] DOC/BUG: Docstring Redesign to fix the problem of unexpected keyword arg (issue10888) (+1 squashed commit) Squashed commits: [756ca05] DOC: Docstring Redesign to fix the problem of unexpected keyword arg (issue10888)
DOC: Docstring Redesign to fix the problem of unexpected keyword arg (issue10888)
thanks! |
Fixed issue #10888