-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
DOC: fix PR02 errors in docstrings - pandas.describe_option, pandas.get_option, pandas.reset_option #57117
DOC: fix PR02 errors in docstrings - pandas.describe_option, pandas.get_option, pandas.reset_option #57117
Conversation
Note, |
Thanks for the contribution @jrmylow. I don't understand your changes here. If you're fixing PR02 errors in docstrings, shouldn't we be adding missing parameters to the docs here? I don't know what is the change in the config module, is this intentional? |
Oh right, I forgot to document the reason for the changes. From 1, I understand that the PR01/02 errors are for function parameters that haven't been documented, and documented parameters that aren't in a function respectively. What I found is that the way these methods are constructed means that they have a strange signature, and the use of inspect/signature is meant to rectify that. Taking
pandas/pandas/_config/config.py Line 451 in 46163c5
The function pandas/pandas/_config/config.py Line 199 in 46163c5
The docstring pandas/pandas/_config/config.py Line 411 in 46163c5
pandas/pandas/_config/config.py Line 424 in 46163c5
However, the PR02 error does not recognise that When examining the signature of
The fix applied has been to copy the function signature (in this case @datapythonista hope this makes sense, happy to proceed with another method if there is a strong argument against this way |
Note as a follow-on from the above, the reason this does not fix |
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.
Thanks for clarifying @jrmylow, this wasn't immediately obvious from the diff. This seems reasonable, I guess it's the best fix we can do. Is there anything else missing here? I see this as a draft PR
This fix only fixes 3 out of 4 of the options. |
I would personally prefer if you address further fixes in new PRs. For reviewers, we'll have to keep reviewing the changes you already have at every iteration if you continue working on this PR, which is not a big problem since the changes are small, but it's still more efficient if we have to review only new changes in the future. |
Ok fair, I'll un-draft it and wait for the code checks to all pass |
Thanks @jrmylow |
…et_option, pandas.reset_option (pandas-dev#57117) * Copy the signature from the implementation * updated code_checs.sh
Test results:
Describe_option
Get_option
Reset_option
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.