-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Fix docstring quotes in pandas.tseries #26982
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
Comments
@datapythonista I checked this issue and while script really returns warnings I wasn't able to find incorrect docstring quotes in offsets.py file. for example:
or
|
@jbrockmendel, I think you've been working on offsets, and will have some more context than me. The I think this is the attribute: https://github.com/pandas-dev/pandas/blob/master/pandas/tseries/offsets.py#L208 In other cases, we fixed this by making the attribute a property, so we can specify the docstring. But in this case I'm getting an exception:
Didn't check in detail, but I thought this could be fixed with a setter. But I get another exception:
Can't set the The two solutions I have in mind are:
But I think we should be able to add a docstring and document |
There are a few things going on here. A while back we needed to make DateOffset immutable. Long story short, we hacked it together by patching That probably isn't what you want, because My only qualm there is the performance impact of property lookups, since we've gone way out of our way to optimize these objects. I don't know how big a performance impact this would actually be, so can't hurt to try. |
Thanks for the info, that's very helpful. I don't see an easy solution here, I guess we'll change the docstring script for now, so it doesn't fail. |
* docstring fixups, closes pandas-dev#26982 * update RangeIndex docstring, closes pandas-dev#22373 * CLN: misc * CLN: update Makefil * update nat docstrings to match * revert controversial
In pandas we keep the quotes in the docstrings standardized in the next way:
But for historical reasons we still have many of this form:
We have a script that is able to detect the wrong cases, that gives the next errors in
pandas.tseries
:We should fix all them, in preparation to validate in the continuous integration that all docstrings in pandas follow our standard.
The text was updated successfully, but these errors were encountered: