-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DOC: Fix code style in any
and all
methods
#51195
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
change double quotes to single quotes
thanks for your PR, but please don't do this to any repo closing then, please search 'good first issue' if you want something to contribute to, and check the contributing guide https://pandas.pydata.org/docs/dev/development/contributing.html |
I saw mixed usage of both in those code examples, so my logic was that must be a mistake. I don't see why I shouldn't have done this, unless mixed usage of both is valid in terms of recommended style guide. |
this is the kind of thing we'd only do with an automated checker, please don't do it by hand |
could do with some help on #37875 if you're interested in docs / stylistic issues |
Does the automated checker also check code examples in docstrings? Because I looked at some more methods and there were many more cases of this mixed usage of single & double quotes. So I thought maybe it's the checker's fault for letting this happen in the first place. The ones with mixed usage:
The ones with double quotes:
|
I came across this today and see that the discrepancies still exist in the docs... Is this not considered an issue? Maybe not a critical issue, but still, it's an eyesore... |
If there is a linter that can check and fix this automatically, I think we would be happy to take a PR for that |
one complication is pandas' complicated docstring substitution mechanism...I don't it would be too easy to fix this automatically, but it should be possible to verify that it's done by amending pandas/scripts/validate_docstrings.py Lines 194 to 211 in aa3e949
to do some other check not sure it would be worth it, and i can't commit to reviewing at this time, just pointing it out as a possibility |
change double quotes to single quotes
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.